i would like to know if there's a way of centering an image as my MDIForm background?
Printable View
i would like to know if there's a way of centering an image as my MDIForm background?
Images cannot go on an MDIForm. Only objects with an align property may go on them. But with a picture, you can. Place a picture on the MDIForm, make the picture box the same size as the MDIForm. You can use this code to keep the picture the same size (incase the MDIForm is resized).
and put an image on top of that picture and load the picture you want to use. Place that picture in the center.Code:Private Sub MDIForm_Resize()
On Error Resume Next
Picture1.Width = Me.Width - 400
Picture1.Height = Me.Height - 400
End Sub
The picturebox is the best way except that u may (this is probably completely wrong) use BitBlt to do it. using the Forms.hdc