|
-
May 13th, 2000, 05:23 PM
#11
Frenzied Member
Ked, you have 2 options,
1 Put the code to draw the bevel inside the usercontrol, not in a module, If you want to do it in a module you're gonna have to give your controls a line method, and I don't know how to do that properly on VB5 or you could have a different line meathod that takes it's parameters like a normal function, ie Line X1,Y1,X2,Y2,Colour rather than Line (X1,Y1)-(X2,Y2) , Colour. or you could use the API drawing methods
Get the size of the DC from
A using select object to get it's bitmap handle (remember to put it back) then use GetObject to get it's size.
B using the controls height and width properties.
and you will need a public hDC property, so you don't get the luxury of not letting users draw on your window.
to set the colour you need to create a brush using the create solid brushAPI, put it into the bitmap using select object (remember to delete the old brush)
The line method is far easier, keep it in the usercontroll, how many usercontrolls have you got that you absolutley Need to share code?
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
|