modtheplanet Posted July 6, 2004 Posted July 6, 2004 Ok this is what i want to do: i have a label on form1. when the user clicks on this label a new form is loaded called 'rename'. with a textbox and a button. the user will be able to type in the textbox to the name they want to rename the label too. now they will then click the button to commit the changes. then the rename form will close and the label on form1 will change to what the user entered in the textbox on the rename form. ok i am able to save what the user enters in the textbox but i dont know how to find when the user closes the form and to commit the changes. any ideas? Quote
wessamzeidan Posted July 6, 2004 Posted July 6, 2004 you can use raname.ShowDialog() and do what ever you want after this statement Execution will stop at this statement untill you close the rename form. Quote Proudly a Palestinian Microsoft ASP.NET MVP My Blog: wessamzeidan.net
Leaders Iceplug Posted July 6, 2004 Leaders Posted July 6, 2004 Also, declare the return value as Public in your prompt form, so that when you press enter to commit the value, you can access it from the previous form. Myform2.ShowDialog() Me.Text = Myform2.MyReturnValue :) Quote Iceplug, USN One of my coworkers thinks that I believe that drawing bullets is the most efficient way of drawing bullets. Whatever!!! :-(
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.