PDA

View Full Version : Solved: Visual Studio Form Control



Rlb53
12-17-2012, 03:46 AM
I hope I am in the correct forum.

I have a form generated in Visual Studio. As the user completes the form (Parent), it calls additional forms (Child) to show that are relative to the data acquired.

I would like to simulate a feature that exists when a plain Message Box appears on the screen.

When a Message Box (called from the standard Msgbox() command) is visible on top of the form being completed, the user cannot select any other object on the screen until the OK, Yes or No, etc. button is selected within the Message Box, the Message Box is Closed and functionality is returned to other components displayed on the Screen.

How may I duplicate this feature with my Child forms that are called?

At this point, if the user clicks anywhere but on the Child form shown, it is sent to Back and can only be acquired by closing the Main (Parent) Form (which encompasses the entire screen) or pulling it back up from the Task Bar.

I am concerned that the User will be disoriented when the Child Form disappears and not realize how to acquire it.

Thank you for your assistance.

Rlb53
12-17-2012, 10:11 AM
Right or Wrong... I figured out a means.

Enter " ParentForm.Enabled=False" into the Initialize section of the Child Form.

Enter "ParentForm.Enabled=True" into the Child Form prior to Me.Close()

Tommy
12-19-2012, 07:11 AM
Hi Rlb53,

That disables the form, you may want to look into modal = true for the children.
You also may want to look into MDI forms. It has a main Form and a lot of children.