搜索了一段在QRcode中插入Logo的代码如下:Dim Bar As New BarCodeBuilder
Bar.Symbology = Barpro.Symbology.QRCode
Bar.Code = "测试:测试"
bar.SaveImage("d:\test.wmf",300)
Dim imgback As image = getimage("d:\test.wmf")
Dim bmp As new bitmap(imgback.width, imgback.height)
Dim g = graphics.fromimage(bmp)
g.DrawImage(imgback, 0, 0, imgback.Width, imgback.Height)
Dim img = getimage("d:\test.ico")
Dim w As Integer = (imgback.width-img.width) / 2
Dim h As Integer = (imgback.height-img.height) / 2
g.DrawImage(img, w, h, img.Width, img.Height)
bmp.Save("d:\test05.jpg")
bmp.dispose
在窗口中增加一个BarCode控件(如下图),想在生成的二维码中插入一个Logo图标,Logo图标是一个ICO文件,路径为本机电脑:d:\我的图标\Logo图标.ico,请问老师,以上代码怎么改,写在哪个事件下。
此主题相关图片如下:2222.png