[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

ClassicHaHa

12/4/2004 1:15:00 PM

How can I get the Hdc of screen in VB.net or C#? It seems to be strange in
VB.net!!
I know in VB6,I can use getdc api to get Hdc of screen,but in Vb.net no such
a function. even under the graphics class the getHdc() is invisible to the
programmers.

Any ideas?
Thanks in advance!!!
--
WH

--
WH
3 Answers

Bob Powell

12/4/2004 7:41:00 PM

0

Use interop and the GetDesktopWindow() and / or GetDC(..) with a null
parameter.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tips...

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/f...

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.





"ClassicHaHa" <adward_einstein@hotmail.com> wrote in message
news:AE57BD4A-EEE6-4C7D-AB4E-AC6C1D8781F2@microsoft.com...
> How can I get the Hdc of screen in VB.net or C#? It seems to be strange in
> VB.net!!
> I know in VB6,I can use getdc api to get Hdc of screen,but in Vb.net no
such
> a function. even under the graphics class the getHdc() is invisible to the
> programmers.
>
> Any ideas?
> Thanks in advance!!!
> --
> WH
>
> --
> WH


ClassicHaHa

12/5/2004 1:55:00 AM

0

Does it mean some can not be achieved by the class provided by .net framework?
So u can not use .Net framework to get a dc of screen. Have to call win32 api.
Anyway,thanks a lot!!!

"Bob Powell [MVP]" wrote:

> Use interop and the GetDesktopWindow() and / or GetDC(..) with a null
> parameter.
>
> --
> Bob Powell [MVP]
> Visual C#, System.Drawing
>
> Find great Windows Forms articles in Windows Forms Tips and Tricks
> http://www.bobpowell.net/tips...
>
> Answer those GDI+ questions with the GDI+ FAQ
> http://www.bobpowell.net/f...
>
> All new articles provide code in C# and VB.NET.
> Subscribe to the RSS feeds provided and never miss a new article.
>
>
>
>
>
> "ClassicHaHa" <adward_einstein@hotmail.com> wrote in message
> news:AE57BD4A-EEE6-4C7D-AB4E-AC6C1D8781F2@microsoft.com...
> > How can I get the Hdc of screen in VB.net or C#? It seems to be strange in
> > VB.net!!
> > I know in VB6,I can use getdc api to get Hdc of screen,but in Vb.net no
> such
> > a function. even under the graphics class the getHdc() is invisible to the
> > programmers.
> >
> > Any ideas?
> > Thanks in advance!!!
> > --
> > WH
> >
> > --
> > WH
>
>
>

Bob Powell

12/5/2004 12:15:00 PM

0

Yes, thats what it means.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tips...

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/f...

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.





"ClassicHaHa" <adward_einstein@hotmail.com> wrote in message
news:295A14A4-332D-4F21-84CA-16B2288C6D42@microsoft.com...
> Does it mean some can not be achieved by the class provided by .net
framework?
> So u can not use .Net framework to get a dc of screen. Have to call win32
api.
> Anyway,thanks a lot!!!
>
> "Bob Powell [MVP]" wrote:
>
> > Use interop and the GetDesktopWindow() and / or GetDC(..) with a null
> > parameter.
> >
> > --
> > Bob Powell [MVP]
> > Visual C#, System.Drawing
> >
> > Find great Windows Forms articles in Windows Forms Tips and Tricks
> > http://www.bobpowell.net/tips...
> >
> > Answer those GDI+ questions with the GDI+ FAQ
> > http://www.bobpowell.net/f...
> >
> > All new articles provide code in C# and VB.NET.
> > Subscribe to the RSS feeds provided and never miss a new article.
> >
> >
> >
> >
> >
> > "ClassicHaHa" <adward_einstein@hotmail.com> wrote in message
> > news:AE57BD4A-EEE6-4C7D-AB4E-AC6C1D8781F2@microsoft.com...
> > > How can I get the Hdc of screen in VB.net or C#? It seems to be
strange in
> > > VB.net!!
> > > I know in VB6,I can use getdc api to get Hdc of screen,but in Vb.net
no
> > such
> > > a function. even under the graphics class the getHdc() is invisible to
the
> > > programmers.
> > >
> > > Any ideas?
> > > Thanks in advance!!!
> > > --
> > > WH
> > >
> > > --
> > > WH
> >
> >
> >