|
-
Apr 24th, 2000, 02:43 AM
#1
Thread Starter
Junior Member
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.
-
Apr 24th, 2000, 04:56 AM
#2
Junior Member
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
-
Apr 24th, 2000, 05:48 AM
#3
I don't know if this is the same as your problem, but lines always disappear when I draw them!!
-
Apr 24th, 2000, 05:56 AM
#4
Junior Member
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]
-
Apr 29th, 2000, 09:02 PM
#5
Thread Starter
Junior Member
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.
-
Apr 30th, 2000, 12:50 AM
#6
Frenzied Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|