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: