Line speed (sucks!), drawing rectangles 
Author Message
 Line speed (sucks!), drawing rectangles

 To draw rectangles consider Rectangle(),
FrameRect() and FillRect() API calls.
They are much faster then using four lines,
and can also fill and frame your rectangle.
(You will need to declare the RECT type to
use the later two)

HTH
-Simon

Robert Martin wrote in article

Quote:
>The line command of Visual Basic 4 isn't to speedy.  Does anyone know of a
>faster alternative to line.

>Thanks




Tue, 22 Feb 2000 03:00:00 GMT  
 Line speed (sucks!), drawing rectangles

Quote:
> The line command of Visual Basic 4 isn't to speedy.  Does anyone know of
a
> faster alternative to line.

Yes.  You need to use some of the API functions to draw into a device
context.  Several objects (Form, Picture) have an hdc property.  You can
use this as the hdc argument to the API functions.  Some of the various
functions are:

AngleArc
Arc
ArcTo
GetArcDirection
LineDDA
LineDDAProc
LineTo
MoveToEx
PolyBezier
PolyBezierTo
PolyDraw
Polyline
PolylineTo
PolyPolyline
SetArcDirection

You can look up these and other device context functions at microsofts
site.
--
Keith Benedict
Software Engineer
CCI/Triad Systems

US Code Title 47, Sec.227(a)(2)(B), a computer / modem / printer
meets the definition of a telephone fax machine.  Sec. 227
(b)(1)(C), it is unlawful to send any unsolicited adverti{*filter*}t
to such equipment.  Sec.227(b)(3)(C), a violation of the
aforementioned Section is punishable by action to recover actual
monetary loss, or $500, whichever is greater, for each violation.



Quote:

> Thanks




Tue, 22 Feb 2000 03:00:00 GMT  
 Line speed (sucks!), drawing rectangles


Quote:

>The line command of Visual Basic 4 isn't to speedy.  Does anyone know of a
>faster alternative to line.

Check the windows API calls. Or use C, if speed is very critical.

                     Shiva
--
"Information is Knowledge, Knowledge is Power, Power is Dangerous"
"Information Overload... I've a thousand pages on it..."
"Play with fire - burn your fingers"



Tue, 22 Feb 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Line speed (sucks!), drawing rectangles

2. Drawing lines, rectangles etc.

3. Draw Resizing Rectangle/Line

4. Draw Resizing rectangle or line

5. Draw rectangle on form at runtime

6. Drawing filled rectangles to the screen in Powerpoint

7. Draw Rubber Rectangle in VB.Net

8. Drawing a Rectangle around a CheckBox?

9. Simply draw a selection rectangle with mousemovement

10. How to draw rotated rectangles in vb.net?

11. Is there a draw-rectangle component for VB?

12. REQUEST: Draw/Erase Rectangles via API in Access

 

 
Powered by phpBB® Forum Software