Wednesday, November 22, 2006

Grab the Desktop as a bitmap...

Ozzie Rules Blogging  - Create a magnifier by painting the Desktop into your form

"Had a question about how to create an application magnifier and was amazed at how easy it was to get a prototype working! Depending on what you consider lines of code it is about 3 lines!

...

Desktop_Hwnd = GetDesktopWindow()

Desktop_HDC = GetWindowDC(Desktop_Hwnd)

Debug.Print(StretchBlt(g.GetHdc, 0, 0, Me.Width, Me.Height, Desktop_HDC, 0, 0, Me.Height / 2, Me.Width / 2, SRCCOPY))

..."

This reminds me of a project I want to try. I want to see if this works (grabbing the desktop as a bitmap) on XP while a Remote Desktop session is running/logged in, but disconnected.

I.e. run an agent on a XP machine, running in the logged on user's process (so we get their Desktop), saving a screenshot to disk even when the user is disconnected (not logged out, but disconnected) from the session.

Thank about 120+ "work horse" machines running batch processing "stuff" that you have to monitor, all of them running Remote Desktop sessions... It would be cool to see their current Desktops without have to RD into each system (through there are ways that that can be made easier...)

It should work... (But I've said that before about other things that should work in disconnected RD sessions...)

No comments:

Post a Comment

NOTE: Anonymous Commenting has been turned off for a while... The comment spammers are just killing me...

ALL comments are moderated. I will review every comment before it will appear on the blog.

Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...

I reserve, and will use, the right to not approve ANY comment for ANY reason. I will not usually, but if it's off topic, spam (or even close to spam-like), inflammatory, mean, etc, etc, well... then...

Please see my comment policy for more information if you are interested.

Thanks,
Greg

PS. I am proactively moderating comments. Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...