Application, IDataObject, Dataformats, Clipboard not declared/defined in a Class Library?

D

DraguVaso

Hi,

I made some application (VB.NET 2005) based on classes in Windows Forms. I
made a new Class Library Project and copied all of my classes and modules in
it, to make a DLL that I could import afterwarths in Windows Forms
applciations.

The problem is that I get several errors indication that some methods aren't
declared or defined when I try to build the project...

some exemples:
- Application.StartupPath doesn't work anymore (it doesn't recognize
Application): does this have another name in a Class Library?
- Dim IData as IDataObject: Type 'IDataObject' is not defined
- Clipboard.SetDataObject(DataObject): Name 'Clipboard' is not declared

Does anybody know a solution for this?

Thanks a lot in advance!

Pieter
 
M

Matt Berther

Hello DraguVaso,

In your class library, add a reference to System.Windows.Forms. This should resolve your problems...
 
D

DraguVaso

Thanks a lot! That did the tric!

Matt Berther said:
Hello DraguVaso,

In your class library, add a reference to System.Windows.Forms. This
should resolve your problems...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top