GetDesktopWindow() in a ActiveX control in .NET

csharp France
  • 10 years ago

    Hi all,

    Here is my first post on that great forum.

    I found this sample code on that site :

    The goal is to capture the screen as bitmap.  This code works very well.

    But when i use this code in the context of a ActiveX  embedded in a web page , it does not capture the entire screen but only the window of the ActiveX Control. 

    It acts like if GetDestopWindow() doesn't return the handle of the desktop.

    Would you have an idea of what happens?



Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“C++: an octopus made by nailing extra legs onto a dog.” - Steve Taylor