放一个图片picturebox控件,然后写代码,如
Dim Bar As New BarCodeBuilder
Bar.Symbology = Barpro.Symbology.QRCode
Bar.Code = "测试:测试"
Dim imgback As image = bar.GetImage
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)
e.Form.controls("picturebox1").image = bmp