Thread View: pl.comp.lang.vbasic
2 messages
2 total messages
Started by Dick van den Hout
Sat, 18 Oct 1997 00:00
Can VB5 paint a polygon??
Author: Dick van den Hout
Date: Sat, 18 Oct 1997 00:00
Date: Sat, 18 Oct 1997 00:00
8 lines
494 bytes
494 bytes
When a triangle, square or polygon is drawed on a form during runtime, how can I perform a paint commando like "PAINT(x,y),c" in the ancient BASIC ??? Thanks
Re: Can VB5 paint a polygon??
Author: Artur Jarkiewicz
Date: Sat, 18 Oct 1997 00:00
Date: Sat, 18 Oct 1997 00:00
56 lines
2298 bytes
2298 bytes
Dick van den Hout wrote: > > When a triangle, square or polygon is drawed on a form during runtime, > how can I perform a paint commando like "PAINT(x,y),c" in the ancient > BASIC ??? > > Thanks Hi! Use FloodFill API Function: Declare Function FloodFill Lib "GDI" (ByVal hDC As Integer, ByVal X As Integer, ByVal Y As Integer, ByVal crColor As Long) As Integer hDC handle of device context X x-coordinate of starting position Y y-coordinate of starting position crColor color of fill boundary The FloodFill function fills an area of the screen surface by using the current brush. The area is assumed to be bounded as specified by the clrref parameter. The FloodFill function begins at the point specified by the nXStart and nYStart parameters and continues in all directions to the color boundary. Parameter Description hDC Identifies the device context. X Specifies the logical x-coordinate at which to begin filling. Y Specifies the logical y-coordinate at which to begin filling. crColor Specifies the color of the boundary. Returns The return value is nonzero if the function is successful. Otherwise, it is zero, indicating that the filling cannot be completed, that the given point has the boundary color specified by clrref, or that the point is outside the clipping region. Comments Only memory device contexts and devices that support raster-display technology support the FloodFill function. Greetings. Artur. -- _ | _______________________________________________________________ / -+-_ ___ ___ _ _ _ ___ ___ \ | |/ || _ \/ __)| || \ |/ \| __) Artur Jarkiewicz | | /_ || /\__ \| || || | || __) aj...@meil.pw.edu.pl | | /___||_\_\(___/|_||_\_|\___/|___) http://www.meil.pw.edu.pl/~ajark | \___________________________________________________________________/
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads