Loading...

GdViewer size

Support for GdViewer OCX and GdViewer Pro ActiveX/SDK.

GdViewer size

Postby CParrott » Mon Feb 16, 2009 9:56 pm

How do I get the GDViewer box to become the actual size of the screen (which varies) upon the form load.
Using VB6.
CParrott
 
Posts: 6
Joined: Wed Sep 24, 2008 8:19 pm

Re: GdViewer size

Postby Tom Moran » Tue Feb 17, 2009 3:54 am

Do you want the size equal to the screen or to the Form?

And... is it the loaded image you want set to the size of the screen/form or just the viewer?
Tom Moran
 
Posts: 102
Joined: Thu May 24, 2007 9:41 am
Location: Phoenix, Arizona

Re: GdViewer size

Postby CParrott » Tue Feb 17, 2009 3:50 pm

I want to have the Viewer fill the screen. The form is loaded Maximized. The size of the image still needs to be the size of the image.
CParrott
 
Posts: 6
Joined: Wed Sep 24, 2008 8:19 pm

Re: GdViewer size

Postby Tom Moran » Tue Feb 17, 2009 5:09 pm

The easiest way is to size the GdViewer to your Form in the forms resize event. An example:
Code: Select all
  oGdViewer.Top = 0
  oGdViewer.Height = Me.Height  '- minus height of other items like menu's, statusbar, etc.
  oGdViewer.Left = 0
  oGdViewer.Width = Me.Width   '- minus width of other items


You will have to make adjustments if you are displaying other controls like menus, toolbars and so forth.
Tom Moran
 
Posts: 102
Joined: Thu May 24, 2007 9:41 am
Location: Phoenix, Arizona

Re: GdViewer size

Postby CParrott » Tue Feb 17, 2009 8:46 pm

Great thanks. I just had to be sure to divide by 15 for the pixel conversion.
CParrott
 
Posts: 6
Joined: Wed Sep 24, 2008 8:19 pm

Re: GdViewer size

Postby Tom Moran » Tue Feb 17, 2009 9:43 pm

Right about the pixel conversion. You probably should use TwipsPerPixel convention instead of hardcoding 15. I believe it's 15 about 99% of the time but there may be some resolutions where it's different.
Tom Moran
 
Posts: 102
Joined: Thu May 24, 2007 9:41 am
Location: Phoenix, Arizona


Return to GdViewer [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest