How might one go about creating a Modeless MessageBox? Do I have to just create my own Windows Form class and use that? If so, is there an easy way of adding a warning icon (rat
//no commnet
object sync = new object();
ManualResetEvent Wait = new ManualResetEvent();
//you should create a place holder named MessageData for Message Data.
List Messages = new List();
internal void ShowMessage(string Test, string Title, ....)
{
MessageData MSG = new MessageData(Test, Title);
Wait.Set();
lock(sync) Messages.Add(MSG);
}
// another thread should run here.
void Private_Show()
{
while(true)
{
while(Messsages.Count != 0)
{
MessageData md;
lock(sync)
{
md = List[0];
List.RemoveAt(0);
}
MessageBox.Show(md.Text, md.Title, md....);
}
Wait.WaitOne();
}
}
needs more threads and more code(I don't have enough time to write) for concurrent messageboxes.