Showing miniature window of second screen

Hey guys

I am working on an application for my office. We have a computer running Windows with two screens. Screen 1 is for the computer operator and the second one is for the client. The problem is that the operator needs to know what the user is seeing so I am looking for a way to create a window on Screen 1 that would be a miniature version of screen 2 but I could not find anything. Any ideas on how to get started?

Thanks for any input you might have

Richard

you could use MBS Plugins to get a screenshot of second screen and draw that picture smaller on other window.

You could probably figure out where each of the Windows is and then use Window.DrawInto to make a copy of each into a picture that you then draw smaller into a canvas. Something like this in the Paint event of a canvas…

[code]//Draw each window into a picture
dim p as new picture(window1.width, window1.height)
Window1.drawinto(p.graphics, 0, 0)

// now draw it onto The canvas
Dim sw as integer = screen(1).width
Dim sh as integer = screen(1).height
Dim scalefactor = min(g.width/sw, g.height/sh)
Dim X as integer = window1.left * scalefactor
Dim y as integer = window1.top * scalefactor
Dim w as integer = window1.width * scalefactor
Dim h as integer = window1.height * scalefactor
G.drawpicture p, X, y, width, height, 0, 0, p.width, p.height
[/code]

You’ll have to put this into a loop and figure out which windows are on the second screen, but it should give you a nice thumbnail version. If you need a somewhat live preview, use a timer to call Canvas.Invalidate() on that canvas periodically (like once per second or something). I also suggest turning on double buffering for the canvas to avoid flicker.

Thanks for your ideas

To Christian: I had already thought of using ScreenCapture but I was trying to get a live view of Screen 1.

To Greg: I will try your solution and see about using a timer.

Thanks again

Richard

My idea would involve using a timer and doing periodical screenshots via plugin functions.

Anyway, drawinto will not draw everything.

I just saw some Windows screen capture code on this other thread

Indeed. Pretty nifty thing Andrew posted to get the cursor. It would seem rather easy to use a timer to echo the screen.