VB到VB.net的绘图API
'有这样的一段使用API绘图的代码(VB6.0)'定义绘图APIPublicDeclareFunctionGdiTransparentBltLib"gdi32"(ByVa...
'有这样的一段使用API绘图的代码 (VB6.0) '定义绘图API Public Declare Function GdiTransparentBlt Lib "gdi32" (ByVal hdc1 As Long, ByVal x1 As Long, ByVal y1 As Long, ByVal W1 As Long, ByVal H1 As Long, ByVal Hdc2 As Long, ByVal X2 As Long, ByVal Y2 As Long, ByVal W2 As Long, ByVal H2 As Long, ByVal Color As Long) As Long '在VB6.0中使用 GdiTransparentBlt 目的位置.hDC,X,Y,W,H,源.hDC,0,0,W,H,RGB(255,255,255) Public Sub Draw(X As Single, Y As Single) GdiTransparentBlt form1.hDC, X, Y, form1.picture1.Width, form1.picutre1.Height, form1.picture1.hDC, 0, 0, form1.picutre1.Width, form1.picture1.Height, RGB(255, 255, 255) '画图 End Sub '我就是想把一张图片的白色背景给弄成透明的。 '这行代码在VB.net 中该怎么修改才能像VB6.0那样使用? '或者在VB.net中怎样弄才能有相同的效果?
展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询