Results 1 to 5 of 5

Thread: [RESOLVED] I need to pop up a messagebox in Console

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2004
    Location
    in the heart of the Mediterranean
    Posts
    1,143

    Resolved [RESOLVED] I need to pop up a messagebox in Console

    Hi ,
    ========================================
    Error 1 The type or namespace name 'Windows' does not exist in the namespace 'System' (are you missing an assembly reference?)
    ========================================

    what is wrong with this code please ?

    Code:
    using System;
    using System.Windows.Forms;
    
    namespace MsgBox
    {
        class Program
        {
            static void Main(string[] args)
            {
              MessageBox.Show("Hello World");
                            
            }
        }
    }
    ------------------------------------------------------------------------
    If an answer to your question has been helpful, then please, Rate it!

  2. #2
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: I need to pop up a messagebox in Console

    You must add a reference to System.Windows.Forms.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2004
    Location
    in the heart of the Mediterranean
    Posts
    1,143

    Re: I need to pop up a messagebox in Console

    but I have done the reference No?

    using System.Windows.Forms;


    ++++++++++++++++++++

    okay thanks solved
    Last edited by angelica; Jan 14th, 2009 at 08:16 AM.
    ------------------------------------------------------------------------
    If an answer to your question has been helpful, then please, Rate it!

  4. #4
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051

    Re: [RESOLVED] I need to pop up a messagebox in Console

    No, those aren't references.

    See this post, which explains the difference between what you've done and a reference:

    http://www.vbforums.com/showpost.php...79&postcount=9
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  5. #5
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: [RESOLVED] I need to pop up a messagebox in Console

    From the exception itself which you posted asked "are you missing an assembly reference?" so you should have gotten a hint from that. =)
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width