为什么使用API绘图时,移动picture框到任务栏以下再回来,屏幕上就会出现纹理
为什么使用API绘图时,移动picture框到任务栏以下再回来,屏幕上就会出现纹理这里的映射模式设置的是twips
Dim k As POINTAPI
k.x = 1440
k.y = -1440
Dim j As POINTAPI
j.x = 304
j.y = 500
SetMapMode Me.Picture1.hdc, 6
'LPtoDP Me.Picture1.hdc, k, 1
'LPtoDP Me.Picture1.hdc, j, 1
MoveToEx Me.Picture1.hdc, 5, 5, k
Dim pen As Long
pen = CreatePen(0, 1, RGB(255, 0, 255))
Dim oldpen As Long
oldpen = SelectObject(Me.Picture1.hdc, pen)
LineTo Me.Picture1.hdc, j.x, j.y
SelectObject Me.Picture1.hdc, oldpen
DeleteObject pen
ReleaseDC Me.hwnd, Me.Picture1.hdc