Is it possible to replicate the VNC manager thumbnail feature using the activeX control?
Regards, Carl Gilbert
There are several ways how it could be implemented. But just to give you a rough idea about our implementation. We use native Windows listview control to show the thumbnail items. To each listview item corresponds a hidden instance of ViewerX control.For this case, when ViewerX is hidden you would want to initialize the following properties:
//since you just want to show a remote screenvncCtrl.ViewOnly = true;//no need to transfer clipboard eithervncCtrl.DisableClipboard = true;//tells ViewerX not to paint the remote screen (ViewerX is hidden, so there is no need to paint it)vncCtrl.ThumbnailMode = true;//allows ScreenUpdatedEvent to be fired for each screen update. By default this event is disabled for performance reasonsvncCtrl.AdvancedSettings.EnableScreenUpdatedEvent = true;So we subscribe to ScreenUpdatedEvent and update an ImageList associated with thumbnails listview control for each screen update. Although in reality it's a bit more complicated than that.
Last but not least, here is how you could get access to the screen bitmap (C# code):using (Bitmap bmp = Bitmap.FromHbitmap(new IntPtr(vncCtrl.ScreenBitmap))){ //do something with bmp }
I hope this helps. Regards,
using (Bitmap bmp = Bitmap.FromHbitmap(new IntPtr(vncCtrl.ScreenBitmap)))
Thank you!
Tim