您的位置首页百科知识

谁能说说在VB6.0中使用GdiTransparentBlt函数?

谁能说说在VB6.0中使用GdiTransparentBlt函数?

的有关信息介绍如下:

谁能说说在VB6.0中使用GdiTransparentBlt函数?

绘图时使某一个颜色值透明 此示例是过滤纯白颜色Private 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 LongPrivate Sub Command1_Click()GdiTransparentBlt Me.hDC, 0, 0, Picture1.ScaleWidth, Picture1.ScaleHeight, _Picture1.hDC, 0, 0, Picture1.ScaleWidth, Picture1.ScaleHeight, RGB(255, 255, 255)Me.Refresh End SubPrivate Sub Form_Load()Me.AutoRedraw = TrueMe.ScaleMode = 3 Picture1.AutoRedraw = TruePicture1.ScaleMode = 3End Sub