I am trying to create a custom MessageBox (which for now I've "cleverly" named MyMessageBox). I have downloaded a new toolkit containing new namespaces which allow me to easily create a "preloaded" custom form... so rather than using System.Windows. Forms; I create a reference to the other reference. So far I've created the new class and have defined the Show method for MyMessageBox. I simply created the class and inherited the other tool kit's form as such...
"this.messa ge" is what I'm trying to figure out... How to display the text in my custom form as the standard message box does.
Go easy on me... I've not been coding but for a couple months.
Any suggestions?
Thanks
Code:
using TheNewToolkitNameSpace;
public partial class MyMessageBox : TheNewToolkitNameSpaceForm
{
public MyMessageBox()
{
InitializeComponent();
}
public void Show(string message, string title)
{
this.message = [I][B]"Trying to figure out the
easiest way to display the
text in the form without
using a label control."[/B][/I]
this.Text = title;
this.Show();
}
public void Show(string message, string title, MessageBoxButtons buttons)
{
//Haven't thought about the buttons just yet;
//Though about just using this.Control.Add
//and setting the values. Perhaps create a
//sub method to handle that and call it when
//needed.
this.Show();
}
Go easy on me... I've not been coding but for a couple months.
Any suggestions?
Thanks
Comment