?
Solved

can't import System.Windows.Forms

Posted on 2005-04-13
6
Medium Priority
?
253 Views
Last Modified: 2010-04-23
I've tried in VS .net Architect and VS 2003, using framework 1.1. anyone know why this would happen??

TIA
0
Comment
Question by:dprasad
  • 3
  • 3
6 Comments
 
LVL 12

Expert Comment

by:S-Twilley
ID: 13774253
can you give a little more detail on what you're trying to do... i know the title says one part but what kind of project have you created, and where/how have you tried to import Windows.Forms?
0
 

Author Comment

by:dprasad
ID: 13774358
im trying to run a very simple bit of code, this:

Imports System.Windows.Forms

Module modSquareRoot

    Sub Main()
        Dim root As Double = Math.Sqrt(2)
        MessageBox.Show("The sq root of 2 is" & root)
    End Sub
End Module
0
 
LVL 12

Accepted Solution

by:
S-Twilley earned 2000 total points
ID: 13774434
you need to add a reference to the dll.

goto your solution explorer (top right usually), right click on references, and goto add reference

scroll down to System.Windows.Forms.dll  and double click, and goto OK

then the code should work
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:dprasad
ID: 13774457

cool thanks!
0
 
LVL 12

Expert Comment

by:S-Twilley
ID: 13774461
if its a console application... you could use something like:

    Sub Main()
        Dim root As Double = Math.Sqrt(2)
        Console.WriteLine("The sq root of 2 is" & root)
        Console.ReadLine()
    End Sub

==========

then you won't need to reference the windows form library...

0
 

Author Comment

by:dprasad
ID: 13774486
ok yeah that works too. i'm trying to get back into .net after a very long time in php world, yuck!
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question