how set a button the default

  • Thread starter Thread starter gif
  • Start date Start date
G

gif

i want set Ok button the default, so if the user click on enter button it is
handles.
what parameter i must set in propreties inspector?

p.s. when the user push on enter button the window musn't close but handle a
function.
 
* "gif said:
i want set Ok button the default, so if the user click on enter button it is
handles.
what parameter i must set in propreties inspector?

Set the form's 'AcceptButton' property to the button.
p.s. when the user push on enter button the window musn't close but handle a
function.

Don't set the button's 'DialogResult' property, this will prevent closing.
 
how can close the window and return the result to the caller for button with
dialoresult setted to none?
 
* "gif said:
how can close the window and return the result to the caller for button with
dialoresult setted to none?

In C#:

\\\
this.DialogResult = DialogResult.Cancel;
this.Close();
///
 
Really thx!!!

now i have the last trouble... i hope you could help me also for this.
i need to use the function FlashWindow(), but it doesn't work under .NET.
how can i do?
I've thought to make unfocused the window for a bit and then set focus
again...but how?
 
Back
Top