VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Draw a line from a point to specified point using LineTo API

by Karthikeyan (187 Submissions)
Category: Windows API Call/Explanation
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Sat 17th February 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Draw a line from a point to specified point using LineTo API

API Declarations


x As Long
y As Long
End Type
Private Declare Function LineTo Lib "gdi32.dll" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long) As Long
Private Declare Function MoveToEx Lib "gdi32.dll" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, lpPoint As POINT_TYPE) As Long

Rate Draw a line from a point to specified point using LineTo API



Dim xy As POINT_TYPE
Dim rval As Long
Form1.ForeColor = RGB(125, 255, 25)
rval = MoveToEx(Form1.hdc, 50, 50, xy)
rval = LineTo(Form1.hdc, 150, 150)
End Sub
'Visit my Homepage at
'http://www.geocities.com/marskarthik
'http://marskarthik.virtualave.net
'Email: [email protected]

Download this snippet    Add to My Saved Code

Draw a line from a point to specified point using LineTo API Comments

No comments have been posted about Draw a line from a point to specified point using LineTo API. Why not be the first to post a comment about Draw a line from a point to specified point using LineTo API.

Post your comment

Subject:
Message:
0/1000 characters