Property Name | Value | Note |
---|---|---|
FormBorderStyle | Fixed Dialog | |
MinimizeBox | False | |
MaximizeBox | False | |
ControlBox | False | |
Topmost | True | Option. To set it if you want the dialog be the most top one even there is other windows programs. Maybe you will like to return it off in most time. |
ShowIcon | False | When use this option, remember to sets ShowInTaskbar to false,too. As Tod's advice, he leave this true and topmost to false, so the user can switches to another program and get back to this from taskbar. |
ShowInTaskbar | False | To 'hidden' the program from Taskbar. |
CancelButton | The Button object's name | And the Button object's property DialogResult will be set to Cancel, too. |
StartPosition | CenterParent |
For set the dialog's DialogResult, you can set it into a button's action or a custom method with
this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
or just set the button's DialogResult property to the value you want to return.
REMEMBER to call the form with ShowDialog() not Show().
0 件のコメント:
コメントを投稿