Problem importing System.Windows.Forms

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Eric A. Johnson

    #1

    Problem importing System.Windows.Forms

    Hi All,

    I'm sure this is a newbie problem... but after all, I am a .NET newbie.
    I'm trying to use MessageBox.Show , according to my book. It tells me to use
    "Imports System.Windows. Forms". I can import System just fine, but it won't
    (or can't) find the .Windows portion; therefore, I cannot use MessageBox.
    Is there an option somewhere within VS.NET 2002 that I can change to let it
    import properly? I am at my wit's end regarding this, and feeling quite
    frustrated; please do not post merely to taunt me. If there is another
    forum that is more appropriate for this kind of problem, by all means tell
    me, but please do me the courtesy of attempting to help me out. Thank you.

    Sincerely,
    Eric


  • mark@muddyboots.com

    #2
    Re: Problem importing System.Windows. Forms

    Dear Eric,

    I imagine you just need to add a reference to System.Windows. Forms to
    your application. To do this, right click the References option in
    Solution Explorer and choose Add Reference. Locate
    System.Windows. Forms.dll in the .NET tab and double-click it, then
    press OK and you should be able to use a message box.

    Regards,

    Mark.

    Comment

    • Dragon

      #3
      Re: Problem importing System.Windows. Forms

      Hi Eric,

      You need to add a reference to System.Windows. Forms assembly to access
      its classes, namespaces etc.
      Project -> Add Reference...

      HTH
      Roman


      Comment

      Working...