Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB.net compiler

Status
Not open for further replies.

yuli1104

Programmer
Feb 20, 2002
60
CA
Hello all,
I am using WinNT and want to see how .net is working. so I downloaded .NET Framework Version 1.0 Software Development Kit (SDK) from Microsoft and installed. When I am trying to compile an example from quickstart,
Imports System
Imports System.ComponentModel
Imports System.Drawing
Imports System.Windows.Forms

Namespace Microsoft.Samples.WinForms.VB.SimpleHelloWorld

Public Class SimpleHelloWorld
Inherits System.Windows.Forms.Form

'Run the application
<STAThread()> Shared Sub Main()
System.Windows.Forms.Application.Run(New SimpleHelloWorld())
End Sub

Public Sub New()
MyBase.New()
Me.Text = "Hello World"
End Sub

End Class

End Namespace

I always got the error :
C:\SimpleHelloWorld.vb(14) : error BC30466: Namespace or type 'Forms' for the Im
ports 'System.Windows.Forms' cannot be found.

Imports System.Windows.Forms
~~~~~~~~~~~~~~~~~~~~
C:\SimpleHelloWorld.vb(18) : error BC30002: Type 'System.Windows.Forms.Form' is
not defined.

Inherits System.Windows.Forms.Form
~~~~~~~~~~~~~~~~~~~~~~~~~
C:\SimpleHelloWorld.vb(22) : error BC30456: 'Windows' is not a member of 'System
'.

System.Windows.Forms.Application.Run(New SimpleHelloWorld())
~~~~~~~~~~~~~~
C:\SimpleHelloWorld.vb(27) : error BC30456: 'Text' is not a member of 'SimpleHel
loWorld'.

Me.Text = "Hello World"

It seems the SDK didn't register System.Windows.Forms dll well ?

I even uninstall the sdk and reinstall, it doesn't work. Please help. thanks
 
Thank you very much. It is working now after I added the reference on command line.
Have a great day.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top