I am new to coding in C# but what I wish to do seems relatively simple so I reckon the solution is probably not to difficult.
I have written an application (using Visual Basic Studio) which comes up in a normal window like any application. When a user clicks on a button to change a particular attribute another small popup window is displayed to the user allowing them to change what it is they wish to change.
My question is how do you control the popup window such that they are unable to click back onto the parent window until they have submitted their changes or pressed "Ok" on the popup window - I believe focus should be given to the popup window and the titlebar should blink indicating to the user to confirm their choice?
Any help or pointers would be much appreciated.
Thanks.
Jonny1985 Thursday, April 24, 2008 3:04 PM
Use ShowDialog instead of Show when showing the confirmation form.
David M Morton Thursday, April 24, 2008 3:09 PM
Use ShowDialog instead of Show when showing the confirmation form.
David M Morton Thursday, April 24, 2008 3:09 PM
heya
as soon as i saw you're post i was wondering if i could do it...
i managed to get this...
private void Click(object sender, EventArgs e)
{
Form2 form = new Form2();
form.Show();
while(form.Created)
{
this.Enabled = false;
Application.DoEvents();
}
this.Enabled = true;
}
this worked for me,
cheers, kiyac
Kiyac Thursday, April 24, 2008 3:29 PM
Glad you figured out a solution.
Nonetheless, you should go with the .ShowDialog command that David gave you -- much cleaner and more performant.