Article View: pl.comp.lang.vbasic
Article #70Re: Can VB5 paint a polygon??
From: 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 | \___________________________________________________________________/
Technical Details
Message-ID:
<34494446.DEE@meil.pw.edu.pl>Path:
mbox-mo1.pugleaf.net!unknown!not-for-mailReferences:
<62ab6s$kpt$1@news.Kijfhoek.NL.net>Show Full Headers
Complete Article Headers
From: Artur Jarkiewicz <aj...@meil.pw.edu.pl> Subject: Re: Can VB5 paint a polygon?? Date: 1997/10/18 Message-ID: <34494446.DEE@meil.pw.edu.pl> X-Deja-AN: 281600594 References: <62ab6s$kpt$1@news.Kijfhoek.NL.net> Organization: PW Newsgroups: pl.comp.lang.vbasic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit