The VNC Manager - SmartCode Solutions Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Thumbnail mode using ActiveX control Expand / Collapse
Author
Message
Posted 12/20/2007 8:41:09 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 1/18/2008 11:06:28 AM
Posts: 2, Visits: 6
Hi

Is it possible to replicate the VNC manager thumbnail feature using the activeX control?

Regards, Carl Gilbert

Post #1830
Posted 12/20/2007 9:36:09 AM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Administrators
Last Login: Yesterday @ 7:37:56 AM
Posts: 820, Visits: 1,328
It's possible, in fact the VNC Manager uses ViewerX for the thumbnail view implementation.

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 screen
vncCtrl.ViewOnly = true;

//no need to transfer clipboard either
vncCtrl.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 reasons
vncCtrl.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.



Kindest Regards,
SmartCode Solutions Support

Post #1831
Posted 8/29/2008 10:54:24 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 8/29/2008 10:53:23 AM
Posts: 1, Visits: 1
Can ayone convert this C# code to VB6?

using (Bitmap bmp = Bitmap.FromHbitmap(new IntPtr(vncCtrl.ScreenBitmap)))

Thank you!

Tim

Post #2178
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Support (s-code), Alex (s-code)

Permissions Expand / Collapse

All times are GMT -8:00, Time now is 2:49am

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.172. 8 queries. Compression Disabled.