Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
|
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 16th, 2005, 06:02 PM
Authorized User
 
Join Date: May 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default where is my System.Windows.Forms.MessageBox?

this is my very simple progam :
--------------------------------------
namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
System.Windows.Forms.MessageBox.Show("");
        }
    }
}

I got this compilation error:
--------------------------------------------
    Error 1 The type or namespace name 'MessageBox' does not exist in the namespace 'System.Windows.Forms' (are you missing an assembly reference?)
-------------------------------------
Anybody , any ideas ?
Thanks in advance.
Michael
 
Old May 17th, 2005, 01:27 AM
Friend of Wrox
 
Join Date: Apr 2005
Posts: 186
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi,

You have to add the reference to System.Windows.Forms.dll.

Prashant

 
Old May 29th, 2005, 09:21 PM
Authorized User
 
Join Date: May 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
Thank you ,Prashant.
I think you are right.
Michael

 
Old November 14th, 2005, 03:38 AM
Registered User
 
Join Date: Oct 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to new_bie
Default

why would you want a message box to appear in your console application although its just a namespace for your project ConsoleApplication2 i am assuming you are creating a console app. use windows application instead it will make more sense.

newbie





Similar Threads
Thread Thread Starter Forum Replies Last Post
system.stackoverflowexception in system.windows.fo scheidel21 Pro VB.NET 2002/2003 2 May 18th, 2007 12:40 AM
error while referencing system.windows.forms.dll swati_joshi ASP.NET 1.0 and 1.1 Basics 1 March 28th, 2006 03:11 PM
where is my System.Windows.Forms.MessageBox? IZRAILEVICH1 General .NET 2 May 29th, 2005 09:30 PM
System Windows Permission lpastor C# 0 July 9th, 2004 02:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.