System.Windows.Forms not found

Iceplug

Contributor
Joined
Aug 20, 2001
Messages
709
Location
California, USA
Hi. I can compile my projects that don't include this line, but when I try to compile while
Imports System.Windows.Forms
it says that it can't find this (Forms of System.Windows.Forms).
Is there something that I need to download, or any thing that I need to do to get this to work? :(

[edit]I located several System.Windows.Forms files on the computer myself, but the compiler can't find them...[/edit]
 
Is the code something you can post here? Where is this Imports System.Windows.Forms located in your code?

I let .NET do allot of things for me and it has this:
Visual Basic:
Public Class frmEditor
    Inherits System.Windows.Forms.Form
    '...

Where is uses Inherits not Imports. I could be way off the mark here, just starting all this.

Orbity
 
Try going to Project->Add Reference and add System.Windows.Forms.dll
to the list and click OK, and see if that fixed it.
 
I'm using the MSDN download version that doesn't have menus or much else of a UI.
My Imports System.Windows.Forms is after other Imports.
Visual Basic:
Imports System
Imports System.IO
Imports System.Windows.Forms
 
You need to add a project reference to System.Windows.Forms.dll before the import will work.
 
After looking at THIS example in the code library it appears the reference will be used when actually compiling the program from the command line. Have a look at the .bat file included with that project and you will see what I mean.

Have you looked at Sharp Develop?

Orbity
 
Yes, when compiling from the command line you need to specify assembly references as parameters to the compiler.

I think you do so with the /R parameter:

Code:
C:\> vbc.exe [other options] /R:System.Windows.Forms.dll
 
Back
Top