messagebox - C# UserControl as message box -


I want to create a new message box from the UserControl class as the code below, but when I call the show method I do not see it. I have no problem with this .. Please help me .. They have just one button right on this user control, labeled as MSG, image in the form of icon. If the button clicks, the control will be settled. Sorry for poor english ....

  partial class CMMAT: UserControl {public static string OK; Public static string warning; Public static string error; Public static string notification; Public Cmme () {Initial group (); } Show public stable dialog results (string title, string msg) {CMessage form = new CMessage (); Form.Show (); Return form. Return value (title, msg); } Public DialogResult ReturnValue (String Title, String msg) {ICON.Image = Icon (Title). ToBitmap (); MSG.Text = Title; MSG.Text + = '\ n' + msg; This.Visible = true This display (); Return DialogResult.OK; } Private mark mark (string title) {If (heading == CMessage.Ok) returns to the system. Drawing System Icon.Application; If (title == CMessage.Error) returns to the system. Drawing System Icons.Error; If (heading == CMessage.Warning) returns to the system. Drawing System echoes. Warning; Return system. Systems Icon.Information; } Public Zero BT_ Click {Object Sender, EventArgs} {this.Dispose (); }}}}  

If you really need it, you can use it as C # or even the heir You can get it

You must be created in the message box.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -