|
-
Jan 22nd, 2008, 08:37 PM
#1
Thread Starter
Frenzied Member
paint event mdi container
Hey,
Is it allowed to draw some custom text on a mdi container form in the paint event?
I tried to drawstring as an example but it does not show up.
Thanks,
Don't anthropomorphize computers -- they hate it
-
Jan 22nd, 2008, 08:52 PM
#2
Re: paint event mdi container
There's a link in my signature that shows you how to access the MDI parent background.
-
Jan 22nd, 2008, 08:56 PM
#3
Thread Starter
Frenzied Member
Re: paint event mdi container
I love this place, the replies are always quick.
Thank You,
Don't anthropomorphize computers -- they hate it
-
Jan 22nd, 2008, 09:11 PM
#4
Thread Starter
Frenzied Member
Re: paint event mdi container
hmmm, it works fine if I set the backcolor.
This however, does not work.
[vbcode]
For Each ctl As Control In Me.Controls
If TypeOf ctl Is MdiClient Then
Dim g As Graphics = ctl.CreateGraphics
g.DrawRectangle(Pens.AntiqueWhite, New Rectangle(200, 200, 500, 500))
End If
Next
[/vbcode]
Don't anthropomorphize computers -- they hate it
-
Jan 22nd, 2008, 09:13 PM
#5
Re: paint event mdi container
As for all controls, you have to draw on the MdiClient's Paint event or your drawing will simply be erased next time the control is repainted.
-
Jan 22nd, 2008, 09:14 PM
#6
Thread Starter
Frenzied Member
Re: paint event mdi container
agh, makes sense. forgot, thanks.
Don't anthropomorphize computers -- they hate it
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
|