badbee
New member
- Joined
- Feb 21, 2006
- Messages
- 2
- Programming Experience
- 1-3
I am trying to draw an image on MDI Form.
I am using the following code in the Paint Event of the form:
For Each ctl In Me.Controls
If TypeOf (ctl) Is MdiClient Then
ctl.CreateGraphics.DrawImage(Image.FromFile("C:\Logo.bmp"), New Point(10, 10))
End If
Next
Now, i am having a problem. The problem is that when the form is loaded at the first time, the image is not drawn. But, whenever the paint event occurs after the form is visible, the graphic is drawn.
Any ideas ?
I am using the following code in the Paint Event of the form:
For Each ctl In Me.Controls
If TypeOf (ctl) Is MdiClient Then
ctl.CreateGraphics.DrawImage(Image.FromFile("C:\Logo.bmp"), New Point(10, 10))
End If
Next
Now, i am having a problem. The problem is that when the form is loaded at the first time, the image is not drawn. But, whenever the paint event occurs after the form is visible, the graphic is drawn.
Any ideas ?