-
I need to know how i can draw a rectangle on a form in the same with the same effect that you get when you place a shape-control on a form with FILLSTYLE set to 9.
I'm able to only draw solid rects.
The thing is that I need to use API Call. the LINE-command is no good.
-
Fillstyle - 9?
What is Fillstyle - 9? I only have values 0 to 7 on my shape control...I can't tell you what Pen or Brush to use 'cause Fillstyle 9? But use anyways - the API function Rectangle - It should do what you want...btw - why wouldn't Line work?
Good Luck
-
I don't know if this is the same as your problem, but lines always disappear when I draw them!!
-
If that's the problem set AutoRedraw = True or you can manually handle it by using the Paint event of the form/picturebox...
Good Luck!
[Edited by Cougar0119 on 04-24-2000 at 06:59 PM]
-
I meant DRAWSTYLE instead of FILLSTYLE.
I'll try the Rectangle API. The reason why I can't use the line function is that I'm drawing on the desktop.
-
there's a LineTo and a moveto API,
Code:
Private Declare Function LineTo Lib "gdi32" Alias "LineTo" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long) As Long
Private Declare Function MoveToEx Lib "gdi32" Alias "MoveToEx" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, lpPoint As POINTAPI) As Long
they should be usefull, I'm not sure what lpPoint is, it's probably an out parameter for the old point.