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,
Printable View
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,
There's a link in my signature that shows you how to access the MDI parent background.
I love this place, the replies are always quick.
Thank You,
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]
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.
agh, makes sense. forgot, thanks.