Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MDI Child form hides background photo on Window Maximize 1

Status
Not open for further replies.

rtshort

IS-IT--Management
Joined
Feb 28, 2001
Messages
878
Location
US
I have created a MDI project and loaded a logo onto another form and displayed it using the following code in the resize event:

frmImage.imgLogo.Move 0, 0
frmImage.Width = frmImage.imgLogo.Width
frmImage.Height = frmImage.imgLogo.Height
frmImage.Left = (Screen.Width - frmImage.Width) / 2
frmImage.Top = (Screen.Height - frmImage.Height) / 2
frmImage.Show

The problem I'm having is when the app is minimized to the task bar, then maximized again, if a child form is open at the time the logo centers itself in front of the child form.
What do I need to do to stop this from happening so the child forms will have focus?



Rob
Just my $.02.
 
There are other ways to display a picture in an MDI background.. You can also centralise a picture in an MDI Background via code.

If that is possible, then you dont have to employ a form for doing that.

As a first step, look at the picture property of MDIForm.
 
The PictureProperty has an icon that shows up in the left upper corner. I can remove that if I can use the logo, but how do I center it with code?

Thanks

Rob
Just my $.02.
 
Thanks a million. I actually found an activex control someone wrote and had it available for download. It works great.

Thanks for taking the time to help me!


Rob
Just my $.02.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top