注册 登录
编程论坛 VFP论坛

请大侠看一下设置颜色,谢谢!

schtg 发布于 2023-05-21 18:21, 888 次点击
有两处可以设置颜色,只因我功力太浅,无能为力,反复测试,均未成功,请大侠看一下如何设置颜色,谢谢!
程序代码:
Declare FullQRCode In QRCodeLib.Dll Boolean autoConfigurate,Boolean AutoFit,Integer BackColor,Integer barColor,String Texto,TQRCodeECLevel correctionLevel,TQRCodeEncoding encoding, Integer marginpixels, ;
    Integer moduleWidth,Integer Height,Integer Width,String FileName
Declare FastQRCode In QRCodeLib.Dll String Texto, String FileName
Declare String QRCodeLibVer In QRCodeLib.Dll
Local sFile
sFile = [彩色.bmp]
cStr  = [https://www.baidu.com]
=FastQRCode(cStr, sFile)


[此贴子已经被作者于2023-5-21 20:46编辑过]

3 回复
#2
nbwww2023-05-21 20:09
程序代码:
    DECLARE FullQRCode IN "QRCodeLib.dll" ;
      INTEGER lAutoConfigurate, ;
      INTEGER lAutoFit, ;
      LONG nBackColor, ;
      LONG nBarColor, ;
      STRING cText, ;
      INTEGER nCorrectionLevel, ;
      INTEGER nEncoding, ;
      INTEGER nMarginPixels, ;
      INTEGER nModuleWidth, ;
      INTEGER nHeight, ;
      INTEGER nWidth, ;
      STRING cFileName


Local sFile
sFile = [彩色.bmp]
cStr  = [这是一个测试字符]

  m.lAutoConfigurate = .T.
  m.lAutoFit = .F.
  m.nBackColor = RGB(255, 255, 2)
  m.nBarColor = RGB(0, 0, 220)
  m.nCorrectionLevel = 1 && 0-[L]ow 7%, 1-[M]edium 15%, 2-[Q]uartile 25%, 3-[H]igh 30%]
  m.nEncoding = 4 && Automatic encoding algorithm
  m.nMarginPixels = 0 && pixels
  m.nModuleWidth = 2 && pixels
  m.nHeight = 132 && pixels
  m.nWidth = 132 && pixels
  m.nSize = 132 && pixels

    m.tnType = 0
    m.lcType = "BMP"

    FullQRCode(m.lAutoConfigurate, m.lAutoFit, m.nBackColor, m.nBarColor, ;
        m.cstr, m.nCorrectionLevel, m.nEncoding, m.nMarginPixels, ;
        m.nModuleWidth, m.nHeight, m.nWidth, m.sFile)
#3
schtg2023-05-21 20:46
回复 2楼 nbwww
非常感谢,成功!
#4
tigerpub2023-05-21 21:41
"QRCodeLib.dll" 哪里下载?
1