Not a Member Yet,
Click here to Register
How do you like the new design?
It's cool, great job
[tally: 70%] 70%
It's okay
[tally: 20%] 20%
Its OK but I liked the old layout better
[tally: 0%] 0%
Please bring the old one back
[tally: 10%] 10%

votes: 10

ID: 133
Viewed: 2490
Added: Apr 28, 2002
Version:
Snippet uploaded by: snippet
Written By: unknown
Demo: Sorry, no demo



User Rated at: 0 Stars
Rate This:

Thank you for your vote. Please wait...

It appears you already voted for this snippet

It appears your vote value was empty

Windows API Guide: Ellipse Function Platforms: Win32s, Win 95/98, Win NT Ellipse draws an ellipse on a device. The two coordinate pairs passed to the function are not part of the ellipse itself, but define its bounding rectangle. The bounding rectangle is the smallest possible rectangle containing the ellipse. The ellipse will be drawn with the color of the object's .ForeColor property. The function returns 0 if it fails, or 1 if it succeeds.

Highlight all by clicking in box
<!---Declaration--->
none

Highlight All
<!---Code--->
'Ellipse Function
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
'hdcThe device context of the object to draw on.
X1The x coordinate of the bounding rectangle's upper-left corner.
Y1The y coordinate of the bounding rectangle's upper-left corner.
X2The x coordinate of the bounding rectangle's lower-right corner.
Y2The y coordinate of the bounding rectangle's lower-right corner.
Example:
' Draw a red ellipse with bounding rectangle (25,30)-(100,75)
' on PictureBox1
Dim retval As Long ' return value
PictureBox1.ForeColor = RGB(255, 0, 0) ' set color to draw in to red
retval = Ellipse(PictureBox1.hdc, 25, 30, 100, 75);


No Comments to show

Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.


Replying to a Comment...


Adding your comment. Please wait...

Thanks for adding your comment!. After further review it will be added.

There was a problem adding your comment. Please try again.

Please complete all the fields in the form before sending.

© 2002 - 2017 snippetlibrary.com All Rights Reserved. Conditions