Handle to Desktop 
Author Message
 Handle to Desktop

Hi,

How can i get the Handle to Desktop in .NET ?

Or will i have to use the GetDesktopWindow API, which is
not .NET , i beleive.

Also after having the handle, Are there methods in .NET
that let me manipulate a window using its Handle, like
Win32 APIs ?

Thanx in advance...

Salman



Tue, 28 Dec 2004 13:02:55 GMT  
 Handle to Desktop
Salman,

    You will have to use the GetDesktopWindow API, as you said.  You can use
some methods in .NET (although not many I imagine).  But, just like using
GetDesktopWindow, you can use almost any other API (if not all of them)
through the P/Invoke layer.

    Hope this helps.

--
               - Nicholas Paldino [.NET MVP]


Quote:
> Hi,

> How can i get the Handle to Desktop in .NET ?

> Or will i have to use the GetDesktopWindow API, which is
> not .NET , i beleive.

> Also after having the handle, Are there methods in .NET
> that let me manipulate a window using its Handle, like
> Win32 APIs ?

> Thanx in advance...

> Salman



Tue, 28 Dec 2004 20:55:23 GMT  
 Handle to Desktop
Try this class:

http://www.gotdotnet.com/userarea/keywordsrch.aspx?keyword=win32window

--
Visit the C# product team at http://www.gotdotnet.com/team/csharp

This posting is provided "AS IS" with no warranties, and confers no rights.



Quote:
> Salman,

>     You will have to use the GetDesktopWindow API, as you said.  You can
use
> some methods in .NET (although not many I imagine).  But, just like using
> GetDesktopWindow, you can use almost any other API (if not all of them)
> through the P/Invoke layer.

>     Hope this helps.

> --
>                - Nicholas Paldino [.NET MVP]



> > Hi,

> > How can i get the Handle to Desktop in .NET ?

> > Or will i have to use the GetDesktopWindow API, which is
> > not .NET , i beleive.

> > Also after having the handle, Are there methods in .NET
> > that let me manipulate a window using its Handle, like
> > Win32 APIs ?

> > Thanx in advance...

> > Salman



Wed, 29 Dec 2004 02:44:01 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How can i get the handle on desktop objects

2. Q: Getting the desktop window's handle (GetDesktopWindow ain't cutting it)

3. Help: Windows 95 Desktop Handle

4. Q: Release or delete desktop handle

5. BitBlt - Desktop Handle

6. Hiding all Icons on the Desktop and Using Active Desktop

7. Application handle from mutex handle?

8. Error Handling (Handle by number)

9. VB5: convert VB file handle to OS file handle

10. Window Handle based on Instance Handle???

11. Handling a Handle...?

12. Error Handling Is not Handling

 

 
Powered by phpBB® Forum Software