473,489 Members | 2,492 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

class library problem

I am assuming that Microsoft has renamed their (dll's) and are now calling
them class libraries since I can't find anything related to dll's in Visual
Studio. If I am correct in this assumption then can anyone help me with how
to have my class library display a MessageBox.Show. I can't seem to add the
proper using statement to get access to that class.

Can dll's access messageboxes?

On a side note: Is is possible for a class library/dll to open a windows
form?

I am new to VS but am very familiar with the old dll and windows stuff so
not quite sure why this is so difficult...

Thanks,

glenn
Nov 16 '05 #1
3 3038
Within the .NET world, the common name for .NET dll's is
assembly and you add a reference to an assembly from your
own application/assembly/etc to access the
classes/functions/etc within it.

MessageBox.Show() is part of the System.Windows.Forms
namespace, so you would have to include a reference to the
System.Windows.Forms.dll assembly.

It is possible to have a class library/dll open a windows
form. So long as the assembly you are opening it from has
access to it (either in the same assembly or another one),
you would open it just as you would from another window or
console app (provided you are referencing
System.Windows.Forms)
-----Original Message-----
I am assuming that Microsoft has renamed their (dll's) and are now callingthem class libraries since I can't find anything related to dll's in VisualStudio. If I am correct in this assumption then can anyone help me with howto have my class library display a MessageBox.Show. I can't seem to add theproper using statement to get access to that class.

Can dll's access messageboxes?

On a side note: Is is possible for a class library/dll to open a windowsform?

I am new to VS but am very familiar with the old dll and windows stuff sonot quite sure why this is so difficult...

Thanks,

glenn
.

Nov 16 '05 #2
Well, that is what I figured as well, however, its not obvious how to do
what you are telling me. If I click on the references and tell it to add a
reference, there is no such item to add. If I manually go to the top of my
unit and just add the using statement for System.Windows.Forms it tells me
it doesn't exist.

It looks like because I'm in an assembly I loose access to that part of the
system. So how do I get it to add properly so I can use it?

Thanks,

glenn

"Brendan Grant" <gr****@dahat.com> wrote in message
news:05****************************@phx.gbl...
Within the .NET world, the common name for .NET dll's is
assembly and you add a reference to an assembly from your
own application/assembly/etc to access the
classes/functions/etc within it.

MessageBox.Show() is part of the System.Windows.Forms
namespace, so you would have to include a reference to the
System.Windows.Forms.dll assembly.

It is possible to have a class library/dll open a windows
form. So long as the assembly you are opening it from has
access to it (either in the same assembly or another one),
you would open it just as you would from another window or
console app (provided you are referencing
System.Windows.Forms)
-----Original Message-----
I am assuming that Microsoft has renamed their (dll's)

and are now calling
them class libraries since I can't find anything related

to dll's in Visual
Studio. If I am correct in this assumption then can

anyone help me with how
to have my class library display a MessageBox.Show. I

can't seem to add the
proper using statement to get access to that class.

Can dll's access messageboxes?

On a side note: Is is possible for a class library/dll

to open a windows
form?

I am new to VS but am very familiar with the old dll and

windows stuff so
not quite sure why this is so difficult...

Thanks,

glenn
.

Nov 16 '05 #3
Nevermind, I exited VS and restared and now I have the windows reference
that I can add. Sorry, not sure why I had to restart it but it at least is
working now...

Thanks,

glenn
"Brendan Grant" <gr****@dahat.com> wrote in message
news:05****************************@phx.gbl...
Within the .NET world, the common name for .NET dll's is
assembly and you add a reference to an assembly from your
own application/assembly/etc to access the
classes/functions/etc within it.

MessageBox.Show() is part of the System.Windows.Forms
namespace, so you would have to include a reference to the
System.Windows.Forms.dll assembly.

It is possible to have a class library/dll open a windows
form. So long as the assembly you are opening it from has
access to it (either in the same assembly or another one),
you would open it just as you would from another window or
console app (provided you are referencing
System.Windows.Forms)
-----Original Message-----
I am assuming that Microsoft has renamed their (dll's)

and are now calling
them class libraries since I can't find anything related

to dll's in Visual
Studio. If I am correct in this assumption then can

anyone help me with how
to have my class library display a MessageBox.Show. I

can't seem to add the
proper using statement to get access to that class.

Can dll's access messageboxes?

On a side note: Is is possible for a class library/dll

to open a windows
form?

I am new to VS but am very familiar with the old dll and

windows stuff so
not quite sure why this is so difficult...

Thanks,

glenn
.

Nov 16 '05 #4

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

Similar topics

7
2513
by: SevDer | last post by:
Hi I have a class library that needs to download the HTML in a specific page of ours with provided querystring. When I open this URL with any browser, it loads fine. When I do WebRequest from Web...
3
1627
by: eBob.com | last post by:
I have several applications which mine web sites for personal information which they publish. They publish the info in one form, I transform the info into Excel spreadsheets. So all these...
4
1673
by: Tony Johansson | last post by:
Hello! I have one solution file that consist of three project. One project that build the exe file called A One project that build a user control dll. Here we have a class called B One project...
5
1925
by: Tony Johansson | last post by:
Hello! I have one solution file that consist of three project. One project that build the exe file called A One project that build a user control dll. Here we have a class called B One project...
0
1726
by: tony | last post by:
Hello! I have one solution file that consist of three project. One project that build the exe file called A One project that build a user control dll. In this user control we have a class...
1
1516
by: Tony Johansson | last post by:
Hello!! I use VS 2003 and C#. I have sent several mail even tried with crossgroup because I want to find out if my problem is a bug in .NET or if .NET doesn't support what I do. It's only one...
1
2431
by: Tony Johansson | last post by:
Hello!! I use VS 2003 and C#. I have sent several mail even tried with crossgroup because I want to find out if my problem is a bug in .NET or if .NET doesn't support what I do. It's only one...
5
1980
by: tony | last post by:
Hello! This is a rather long mail but it's a very interesting one. I hope you read it. I have tried several times to get an answer to this mail but I have not get any answer saying something...
5
6758
by: Jesper Schmidt | last post by:
When does CLR performs initialization of static variables in a class library? (1) when the class library is loaded (2) when a static variable is first referenced (3) when... It seems that...
0
2393
by: drawing in aspnet | last post by:
Question about putting the data layer in a separate class library. I keep reading that the data layer should be separated from the presentation layer and put in its own class library. I am...
0
7108
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6967
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7142
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7181
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6847
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
3078
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1383
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
618
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.