Declare Function MoveToEx Lib "gdi32.dll" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, lpPoint As POINTAPI) As Long
lpPoint
. You can safely ignore the value returned.hdc | The device context of the control to reference. |
x | The x coordinate of the point to set as the current point. |
y | The y coordinate of the point to set as the current point. |
lpPoint | Receives the coordinate of the former current point. |
'Draw a line from (0,0) to (100,100) in Form1
'The LineTo function starts from the current point, so we have to first
'set the current point to (0,0). Notice how lpPoint can be ignored.
Dim old As POINTAPI
x = MoveToEx(Form1.hDC, 0, 0, old) 'set current point
x = LineTo(Form1.hDC, 100, 100) 'draws from (0,0)
Paul Kuliniewicz
E-mail: Borg953@aol.com
All material presented on these pages is Copyright © Paul Kuliniewicz, except for other copyrighted material.
http://members.aol.com/Borg953/api/m.html