System.WinForms does not work
Can someone explain to me why the following program won't compile?
using System;
using System.WinForms;
class Application
{
public static void Main(String[] args)
{
Console.WriteLine("Hello!");
}
}
The error I get is:
C:MYPROJ~1PERSON~1DABBLI~1Test1.cs(2,14): error CS0234: The type or namespace
name 'WinForms' does not exist in the class or namespace 'System'
[454 byte] By [
dingding] at [2007-11-9 18:22:21]

# 1 Re: System.WinForms does not work
add option /r:system.winforms.dll when compile
"dingding" <optimus@elong.com> wrote in message
news:39d29891$1@news.dev-archive.com...
>
> Can someone explain to me why the following program won't compile?
>
> using System;
> using System.WinForms;
>
> class Application
> {
> public static void Main(String[] args)
> {
> Console.WriteLine("Hello!");
> }
> }
>
> The error I get is:
>
> C:MYPROJ~1PERSON~1DABBLI~1Test1.cs(2,14): error CS0234: The type or
namespace
> name 'WinForms' does not exist in the class or namespace 'System'
>
>
# 2 Re: System.WinForms does not work
Hi
I was also having the same problem - now I get:
C:\WINNT\ComPlus\v2000.14.1812\system.winforms.dll: error CS0011: Referenced
class 'System.WinForms.RichControl' has unknown base class or interface
'Microsoft.Win32.Interop.IOleControl'
Actually, a whole bunch of them.
Any ideas.
Thanks
Paul
"Vladimir Suponitsky" <suponvla@bellatlantic.net> wrote in message
news:39d29b70$1@news.dev-archive.com...
> add option /r:system.winforms.dll when compile
>
> "dingding" <optimus@elong.com> wrote in message
> news:39d29891$1@news.dev-archive.com...
> >
> > Can someone explain to me why the following program won't compile?
> >
> > using System;
> > using System.WinForms;
> >
> > class Application
> > {
> > public static void Main(String[] args)
> > {
> > Console.WriteLine("Hello!");
> > }
> > }
> >
> > The error I get is:
> >
> > C:MYPROJ~1PERSON~1DABBLI~1Test1.cs(2,14): error CS0234: The type or
> namespace
> > name 'WinForms' does not exist in the class or namespace 'System'
> >
> >
>
>
Paul at 2007-11-11 22:28:46 >

# 3 Re: System.WinForms does not work
Paul,
You need to reference System.Winforms.dll and Microsoft.Win32.Interop.DLL
"Paul" <paulm@microgaming.com> wrote in message
news:39e6aa5e@news.dev-archive.com...
> Hi
>
> I was also having the same problem - now I get:
>
> C:\WINNT\ComPlus\v2000.14.1812\system.winforms.dll: error CS0011:
Referenced
> class 'System.WinForms.RichControl' has unknown base class or interface
> 'Microsoft.Win32.Interop.IOleControl'
>
> Actually, a whole bunch of them.
>
> Any ideas.
>
> Thanks
> Paul
>
> "Vladimir Suponitsky" <suponvla@bellatlantic.net> wrote in message
> news:39d29b70$1@news.dev-archive.com...
> > add option /r:system.winforms.dll when compile
> >
> > "dingding" <optimus@elong.com> wrote in message
> > news:39d29891$1@news.dev-archive.com...
> > >
> > > Can someone explain to me why the following program won't compile?
> > >
> > > using System;
> > > using System.WinForms;
> > >
> > > class Application
> > > {
> > > public static void Main(String[] args)
> > > {
> > > Console.WriteLine("Hello!");
> > > }
> > > }
> > >
> > > The error I get is:
> > >
> > > C:MYPROJ~1PERSON~1DABBLI~1Test1.cs(2,14): error CS0234: The type or
> > namespace
> > > name 'WinForms' does not exist in the class or namespace 'System'
> > >
> > >
> >
> >
>
>
# 4 Re: System.WinForms does not work
"Paul" <paulm@microgaming.com> wrote:
>Hi
>
>I was also having the same problem - now I get:
>
>C:\WINNT\ComPlus\v2000.14.1812\system.winforms.dll: error CS0011: Referenced
>class 'System.WinForms.RichControl' has unknown base class or interface
>'Microsoft.Win32.Interop.IOleControl'
>
>Actually, a whole bunch of them.
>
>Any ideas.
>
>Thanks
>Paul
>
>"Vladimir Suponitsky" <suponvla@bellatlantic.net> wrote in message
>news:39d29b70$1@news.dev-archive.com...
>> add option /r:system.winforms.dll when compile
>>
>> "dingding" <optimus@elong.com> wrote in message
>> news:39d29891$1@news.dev-archive.com...
>> >
>> > Can someone explain to me why the following program won't compile?
>> >
>> > using System;
>> > using System.WinForms;
>> >
>> > class Application
>> > {
>> > public static void Main(String[] args)
>> > {
>> > Console.WriteLine("Hello!");
>> > }
>> > }
>> >
>> > The error I get is:
>> >
>> > C:MYPROJ~1PERSON~1DABBLI~1Test1.cs(2,14): error CS0234: The type or
>> namespace
>> > name 'WinForms' does not exist in the class or namespace 'System'
>> >
>> >
>>
>>
>
>
# 5 Re: System.WinForms does not work
You really need to add a lot of references. For a simple form I had to add:
/r:System.dll
/r:System.Drawing.DLL
/r:System.WinForms.DLL
/r:Microsoft.Win32.Interop.DLL
"Paul" <paulm@microgaming.com> wrote:
>Hi
>
>I was also having the same problem - now I get:
>
>C:\WINNT\ComPlus\v2000.14.1812\system.winforms.dll: error CS0011: Referenced
>class 'System.WinForms.RichControl' has unknown base class or interface
>'Microsoft.Win32.Interop.IOleControl'
>
>Actually, a whole bunch of them.
>
>Any ideas.
>
>Thanks
>Paul
>
>"Vladimir Suponitsky" <suponvla@bellatlantic.net> wrote in message
>news:39d29b70$1@news.dev-archive.com...
>> add option /r:system.winforms.dll when compile
>>
>> "dingding" <optimus@elong.com> wrote in message
>> news:39d29891$1@news.dev-archive.com...
>> >
>> > Can someone explain to me why the following program won't compile?
>> >
>> > using System;
>> > using System.WinForms;
>> >
>> > class Application
>> > {
>> > public static void Main(String[] args)
>> > {
>> > Console.WriteLine("Hello!");
>> > }
>> > }
>> >
>> > The error I get is:
>> >
>> > C:MYPROJ~1PERSON~1DABBLI~1Test1.cs(2,14): error CS0234: The type or
>> namespace
>> > name 'WinForms' does not exist in the class or namespace 'System'
>> >
>> >
>>
>>
>
>
