C# Programming
02-11-2010, 12:52 AM
Hi All
i have a class that inherits from the Label class.this class have to returns a DialogResult like a Button Control.but i can't create this property correctly.the following code is my class:
public class GA5_Button : System.Windows.Forms.Label
{
[Browsable(true),
DefaultValue(typeof(System.Windows.Forms.DialogResult))]
public DialogResult MyDialogResult
{
get;
set;
}
}
i want to click on this Control then set the Form.DialogResult on MyDialogResult value.how can i do this?sorry for bad english
Thanks in advance
modified on Tuesday, February 9, 2010 10:02 AM
i have a class that inherits from the Label class.this class have to returns a DialogResult like a Button Control.but i can't create this property correctly.the following code is my class:
public class GA5_Button : System.Windows.Forms.Label
{
[Browsable(true),
DefaultValue(typeof(System.Windows.Forms.DialogResult))]
public DialogResult MyDialogResult
{
get;
set;
}
}
i want to click on this Control then set the Form.DialogResult on MyDialogResult value.how can i do this?sorry for bad english
Thanks in advance
modified on Tuesday, February 9, 2010 10:02 AM