Declare Function Ellipse Lib "gdi32.dll" (ByVal hdc As Long, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
ForeColor
property. You can safely ignore the error code returned.hdc | The device context of the object. |
X1 | The x coordinate of the imaginary box's upper-left corner. |
Y1 | The y coordinate of the imaginary box's upper-left corner. |
X2 | The x coordinate of the imaginary box's lower-right corner. |
Y2 | The y coordinate of the imaginary box's lower-right corner. |
'Draw a red ellipse
Picture1.ForeColor = RGB(255, 0, 0) 'red
x = Ellipse(Picture1.hdc, 25, 25, 75, 50)
Declare Function EqualRect Lib "user32.dll" (lpRect1 As RECT, lpRect2 As RECT) As Long
lpRect1 | The first of the two rectangles to check. |
lpRect2 | The second of the two rectangles to check. |
'Check to see if the rectangles are equal
'This example uses the SetRect API function to set the values of a RECT
Dim r As RECT, s As RECT
x = SetRect(r, 50, 50, 150, 150) 'Set r.Left, .Top, .Right, .Bottom
x = SetRect(s, 50, 50, 150, 150) 'Set s the same way
Form1.Print EqualRect(r, s) 'returns 1 -- they are equal
x = SetRect(s, 100, 100, 200, 200) 'Set s to this
Form1.Print EqualRect(r, s) 'returns 0 -- they are unequal
Declare Function ExitWindowsEx Lib "user32.dll" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
uFlags | Exactly one of the Exit Windows flags that tell the function what to do. |
dwReserved | Reserved for future versions of Windows. Always set to 0. |
'This code will reboot the user's computer.
x = ExitWindowsEx(EWX_REBOOT, 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/e.html