Information générale
Catégorie:
Gestionnaire d'écran & Écrans
This is why I do not use any modal forms -- too many problems. I also wanted the 'modal' forms to be specific to the current MDI form that it was called from and not to others. So modal would not work. All my forms are modeless.
I have developed what I call semi-modal forms in my framework. I have a shadowbox control on the main MDI form that is activated when a user opens a child form. The child form is opened and bindevents is used to connect to its Release and Destroy events. The child form NAME reference is also saved to a ChildForm property on the MDI form. The MDI form's thisform reference is passed as a parameter to the child form and saved and the child form triggers the shadowbox control on the MDI form. The shadowbox control MouseDown event is used to either put focus back to the child form or to close the child form (controlled by a property on the MDI form). The child form's save button does a RAISEEVENT of a method in the parent MDI form to pass parameters; this method in the MDI form (OnFormChildName) then releases the child form and removes the bindevent and resets the shadowbox. If the user closes the child form by the upper right-hand 'X' button, then the bindevents is used to cleanup. The shadowbox control (actually an image control) when activated does a screen capture of the MDI form (and does an alpha blend to darken the image) and then sets the visibility of all MDI controls to False and its visibility to True and sets the picture property to the captured image (saved in the user's TEMP folder). When the shadowbox control is deactivated it restores the MDI controls visibility to True and its to False. This is done so that ActiveX controls will not 'bleed' through the overlaid image.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement