Foxtable(狐表)用户栏目专家坐堂 → 二维码中插入一个Logo问题


  共有2452人关注过本帖树形打印复制链接

主题:二维码中插入一个Logo问题

帅哥哟,离线,有人找我吗?
有点甜
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/9/11 10:42:00 [显示全部帖子]

放一个图片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


 回到顶部