|
-
Apr 18th, 2006, 07:54 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] In console applications, can't use Messagebox class why???
I can't use Messagebox class in console app's.
why so?
nath
Last edited by Hack; Apr 18th, 2006 at 10:41 AM.
Reason: Added [RESOLVED] to thread title and green "resolved" checkmark
-
Apr 18th, 2006, 08:20 AM
#2
Re: In console applications, can't use Messagebox class why???
MessageBox is a class inside of System.Windows.Forms. Since console apps don't have this referenced in the template, you need to do it manually in order to use them.
---Sorry for deleting. I just wanted to test it and make sure there wasn't something I missed. :P
-
Apr 18th, 2006, 08:28 AM
#3
Re: In console applications, can't use Messagebox class why???
You shouldn't be using MessageBoxes in a console app. Console apps don't have a GUI and the MessageBox class is a GUI element.
-
Apr 18th, 2006, 08:44 AM
#4
Thread Starter
Hyperactive Member
Re: In console applications, can't use Messagebox class why???
-
Apr 18th, 2006, 09:20 AM
#5
Re: In console applications, can't use Messagebox class why???
If this is resolved, you can help other forums members by please pulling down the Thread Tools menu and click the Mark Thread Resolved button. That will let everyone know that you have your answer.
Thank you.
-
Apr 19th, 2006, 02:23 PM
#6
Hyperactive Member
Re: In console applications, can't use Messagebox class why???
 Originally Posted by jmcilhinney
You shouldn't be using MessageBoxes in a console app.
Says who?
-
Apr 19th, 2006, 02:35 PM
#7
Re: [RESOLVED] In console applications, can't use Messagebox class why???
The common-sense fairy, thats who
-
Apr 19th, 2006, 05:49 PM
#8
Re: In console applications, can't use Messagebox class why???
 Originally Posted by umilmi81
Says who? 
The whole point of a console app is that it uses the console to interact with the user. What's wrong with Console.WriteLine to give the user a message? Also, what happens if someone tries to automate your console app by redirecting the standard streams? How's that going to handle a MessageBox?
-
Apr 20th, 2006, 02:43 AM
#9
Fanatic Member
Re: [RESOLVED] In console applications, can't use Messagebox class why???
If u want to use the messagebox in console app. U can add referrence the System.Windows.Forms.dll.
-
Apr 20th, 2006, 01:11 PM
#10
Thread Starter
Hyperactive Member
Re: [RESOLVED] In console applications, can't use Messagebox class why???
 Originally Posted by popskie
If u want to use the messagebox in console app. U can add referrence the System.Windows.Forms.dll.
wonderful site.
thanks
nath
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|