Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to ask if there is some way to make a form just like Messagebox that returns a string (say entered password)when we call show.
the resulting form should behave like a child form of the calling form. I mean when the child form is displayed the calling form should be dissabled with the child form over it
Thank you
Posted
Updated 4-Dec-09 3:08am
v2

1 solution

Yes, you would do exactly what you said. Create a new form class in the designer, add the textbox and a property to return it's text, and then create an instance of it as a child of your main form. Show it modally with ShowDialog() in order to get the behaviour you require.

I think this means you would probably benefit from buying a book on Winforms.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900