Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to show child form in front of parent controls
Message
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
00891594
Message ID:
00892581
Vues:
17
I found a way that works pretty well. I put the image in a PictureBox in a form and set the form BorderStype to none, so you just see the image. I also disable the form and set its StartPosition to CenterScreen. (CenterParent doesn't work.) I show the form in the Form_Load event of the parent form. Then other windows appear in front of the image, and you cannot bring the image to the front by clicking on it. (You can bring it to the front using the Windows menu, however.) I even put code in the Resize event of the parent form to keep the image centered.

---TML

>Thanks, Cathi.
>
>In particular, I want to display a bitmap image on the parent form. It looks best if it is centered and not stretchable. Do you have any other ideas for how to keep the image visible behind the child windows?
>
>---TL
>
>>Hi Thomas,
>>
>>This is a bug in Winforms. You will need to visible off when there is a child form being displayed and turn visible back on when the last child window is closed.
>>
>>>My main application is a Windows MDI form. Menu items cause various child forms to be displayed inside the parent form's window. If I add a control, such as a label, to the parent form, the child forms are displayed behind the control. In other words, the control blocks all or part of the child form. (Coming from a VFP background, this seem to be very odd behavior to me.)
>>>
>>>How can a get the child forms to display in front of the controls on the parent form?
Thomas M. Lamm
Bradbury & Associates
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform