Click to See Complete Forum and Search --> : Creating a background for an MDI Client
Gimpster
Nov 12th, 1999, 03:36 AM
I'm trying to get a background made for an MDI client. The problem I'm having is this. I've tried creating a form that is loaded when the MDI client is started, however, then this form also appears in my list of open child forms, and I don't want that to happen. Then I tried to put a Picture box in the MDI client, and then I could put an image control onto that, however, the problem with that is then the picture box covers up all the other child forms. I need to be able to resize and reposition the background picture, because it is going to be on machines with different resolutions. Does anyone have any suggestions for me, I'm really frustrated, and I am willing to try anything! Please help. Thanks.
------------------
Ryan
corneslen@hotmail.com
ICQ# 47799046
Frans C
Nov 12th, 1999, 04:20 AM
I wouldn't use a form for the picture, but an invisible picturebox. At the resize event of the mdi parent, you could do the resizing of the picture in the picturebox, and then set the mdi parents picture property equal to the image property of the picturebox. eg
Private Sub MDIForm_Resize()
' do the resizing of the picture in the picturebox here
'.....
'.....
MDIForm1.Picture = Picture1.Image
End Sub
Gimpster
Nov 12th, 1999, 04:44 AM
How would you resize a picture in a picture box? I thought you could only resize things in an image control?
------------------
Ryan
corneslen@hotmail.com
ICQ# 47799046
Frans C
Nov 12th, 1999, 05:08 AM
Using the StretchBlt api for instance. But if you want to use vb methods:
Picture1.PaintPicture Picture1.Picture, 0, 0, Picture1.Width * 2, Picture1.Height * 2, 0, 0, Picture1.Width, Picture1.Height, vbSrcCopy
Picture1.Picture = Picture1.Image
will double the size of the picture in the picturebox
Gimpster
Nov 12th, 1999, 06:16 AM
I'm really interested in using the Stretchblt API, but I need a little help with that. I'm confused as to how I would set the destination of the StretchBlt function to be the MDIMain.Picture??? Could you give me an example I can follow? Thanks.
------------------
Ryan
corneslen@hotmail.com
ICQ# 47799046
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.