Using System.Windows.Forms in dlls

  • Thread starter Thread starter Mr. X.
  • Start date Start date
M

Mr. X.

Hello.
I want to use System.Windows.Forms in dlls (C#).
In VB - there was no problem to add :
includes System.Windows.Forms.

How I overcome this problem in C# ?

Thanks :)
 
I want to use System.Windows.Forms in dlls (C#).
In VB - there was no problem to add :
includes System.Windows.Forms.

How I overcome this problem in C# ?

Besides the include statement you must set a reference to the assembly.
 
I want to use System.Windows.Forms in dlls (C#).
In VB - there was no problem to add :
includes System.Windows.Forms.

How I overcome this problem in C# ?

The references that the IDE automatically adds depends
on the project type.

For a Windows app the IDE adds System.Windows.Forms.dll,
but for a class librray you have to add it manually.

Arne
 
The references that the IDE automatically adds depends
on the project type.

For a Windows app the IDE adds System.Windows.Forms.dll,
but for a class librray you have to add it manually.

Note that a DLL that uses Win Forms is not fully
reusable, because it does not work in some contexts.

Unless you need some plugin capability, then I would
keep the GUI specific stuff in the main EXE.

Arne
 
Back
Top