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?
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.