Visual Basic Codes
ActiveX
Miscellaneous
Applications
Code Snippets
Common Dialogs
Special Effects
Database Stuff
Date Time
Files Drives
Forms
Graphics Games
Internet Stuff
Multimedia
Other
Strings
Windows
Visual Basic > Code Snippets sample source codes
Draw a line
Draw a line Private Type POINT_TYPE 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 Private Sub Form_Load() Dim xy As POINT_TYPE Dim rval As Long rval = MoveToEx(Form1.hdc, 100, 90, xy) rval = LineTo(Form1.hdc, 100, 200) End Sub
Privacy Policy
|
Link to Us
|
Links