Richard Payne
asked on
C#, VS2008, threadpool & window form as custom messagebox
(a) I dislike the messagebox as it has no capability to timeout or close it remotely who open it first place. Many other are complex and make use of low level dll code
(b) I have simple custom message box MsgBox.
(c) I use Show() and Hide() to display MsgBox as necessary.
(d) I used backgroundworker thread and cannot use it because I have one elsewhere.
(e) This leave ThreadPool for do operation similar to backgroundworker.
(f) I have search for example in google and most and not successful in finding one related with window form.
Can anyone send me a link which make use of threadpool that open and close window and various useful task. perfer NET 3.5 modern code.
(b) I have simple custom message box MsgBox.
(c) I use Show() and Hide() to display MsgBox as necessary.
(d) I used backgroundworker thread and cannot use it because I have one elsewhere.
(e) This leave ThreadPool for do operation similar to backgroundworker.
(f) I have search for example in google and most and not successful in finding one related with window form.
Can anyone send me a link which make use of threadpool that open and close window and various useful task. perfer NET 3.5 modern code.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Have you considered putting your custom form on a Timer that would close the form at some interval?
var
fmessage
=
new
Form
();
fmessage
.
Width
=
300
;
fmessage
.
Height
=
100
;
fmessage
.
Text
=
"Message Title"
;
fmessage
.
Show
();
Thread
.
Sleep
(
2000
);
fmessage
.
Close
();var fmessage = new Form();
fmessage.Width = 300;
fmessage.Height = 100;
fmessage.Text = "Message Title";
fmessage.Show();
Thread.Sleep(2000);
with a call to your custom MsgBox
fmessage.Close();
ASKER
I notice new "var", is there website link to teach me how and when to use it......fundamental then pro and con.
Why async variable really matter?
Why async variable really matter?