473,320 Members | 1,910 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Accessing a class in a console application

I am a casual programmer learning the C# language.
I have been going thru the examples in a book on the language.
This particular example, which is a console application, calls for a using
statement including the System.Windows.Forms class.
Although I know the class is there since I have seen it automatically
generated for a Windows forms application, it somehow is not picked up by
the Console application.
There is probably a simple solution for this and I would appreciate it if
someone would relay it to me.
Nov 15 '05 #1
1 1010
100
Hi John,
I'm not quite sure what your problem is, but when you compile that console
application did you specify the System.Windows.Forms.dll assembly as a
referenced assembly to the compiler. I don't know how you compile your
programs. Do you use VS .NET or you use command-line compiler?

Reading your post I am taking you use VS.NET; right click on references node
for the project in the *solution explorer* utility, select *Add
reference...* from the menu and then add System.Windows.Forms.dll from the
list.

HTH
B\rgds
100

"John McMahon" <ma******@worldnet.att.net> wrote in message
news:eg**************@tk2msftngp13.phx.gbl...
I am a casual programmer learning the C# language.
I have been going thru the examples in a book on the language.
This particular example, which is a console application, calls for a using
statement including the System.Windows.Forms class.
Although I know the class is there since I have seen it automatically
generated for a Windows forms application, it somehow is not picked up by
the Console application.
There is probably a simple solution for this and I would appreciate it if
someone would relay it to me.

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Mike Oliszewski | last post by:
Given the following c# code: namespace Company2 { public class SomeFunctions { public void FunctionA() { // Do Something. }
5
by: hellrazor | last post by:
Hi, (new to webservices here) Is it possible to access a class instance variable defined in a webservice? I want to access this variable, in addition to the data being returned by the . so...
4
by: Eugen Walcher | last post by:
Hello all, I've tried posting this same question on other newsgroups with no luck. This group seems to have a lot more activity so I apologize if you have seen it before. I'm trying to...
3
by: AdamM | last post by:
Hi all, When I run my VbScript, I get the error: "ActiveX component can't create object: 'getobject'. Error 800A01AD". Any ideas what I did wrong? Here's my VBScript: dim o set...
6
by: Earl Teigrob | last post by:
I am writing an application that dynamically loads user controls at run time based on user options. I would like to give my users the ability to build their own user controls and add them to my...
3
by: John | last post by:
Hi I am trying to access outlook contacts folders and delete the contacts that do not contain a certain category value in the categories field. I have written the below code but am stuck with...
9
by: The.Relinator | last post by:
I need to retrieve a string from the clipboard in a console application, I have tried many methods but all seem to return a null value, any help regarding this issue would be greatly appreciated
5
by: Andy | last post by:
I'm having trouble accessing an unmanaged long from a managed class in VC++.NET When I do, the contents of the variable seem to be mangled. If I access the same variable byte-by-byte, I get the...
1
by: bg_ie | last post by:
Hi, I have my own UserSettings class that I wish to include within my windows application. To include it at the moment, I do something like this - namespace WindowsApplication1 { static...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.