GdPicture.NET Reference Guide
GdViewer Class
Members  Example 





GdPicture14 Namespace : GdViewer Class
The GdViewer class is designed to fully automate most viewing operations you require. The instance of this class can be used as an image viewer control to view supported files, images, PDF documents, as well as easily zoom, rotate, define display area, print or even create thumbnails of those loaded documents.

On the other hand, it can also be used as an interactive tool allowing you to add and edit solely GdPictureXMP annotations.

Syntax
'Declaration
 
<DesignerGeneratedAttribute()>
<ToolboxBitmapAttribute()>
Public NotInheritable Class GdViewer 
   Inherits System.Windows.Forms.UserControl
[DesignerGenerated()]
[ToolboxBitmap()]
public sealed class GdViewer : System.Windows.Forms.UserControl 
public class GdViewer = class(System.Windows.Forms.UserControl)sealed; 
DesignerGeneratedAttribute()
ToolboxBitmapAttribute()
public sealed class GdViewer extends System.Windows.Forms.UserControl
[DesignerGenerated()]
[ToolboxBitmap()]
public __gc __sealed class GdViewer : public System.Windows.Forms.UserControl 
[DesignerGenerated()]
[ToolboxBitmap()]
public ref class GdViewer sealed : public System.Windows.Forms.UserControl 
Remarks
Please, be aware that GdViewer is developed to handle documents, specifically images, in read-only mode. As its name says, it is only a viewer by the definition. If you want to properly deal with images, for example, to rotate page and subsequently save the image, please use the GdPictureImaging class instead.

Please find our Document Viewer Sample here to fully see, how to create, integrate and use the GdViewer control in your application.

Example
How to create and integrate the GdViewer control into your application.
'Define GdViewer object in your application.
Friend WithEvents GdViewer1 As GdViewer
 
'Create an instance.
GdViewer1 = New GdViewer()
 
'Set your preferred properties here.
GdViewer1.Name = "GdViewer1"
GdViewer1.SetBackgroundColor(GdViewer1.ARGBI(255, 245, 245, 220))
' ...
 
'Add to your application controls.
Controls.Add(GdViewer1)
 
'Probably the GdViewer1 instance is disposed of automatically in your application,
'but you can still do it this way.
'GdViewer1.Dispose()
//Define GdViewer object in your application.
internal GdViewer GdViewer1;
 
//Create an instance.
GdViewer1 = new GdViewer();
 
//Set your preferred properties here.
GdViewer1.Name = "GdViewer1";
GdViewer1.SetBackgroundColor(GdViewer1.ARGBI(255, 245, 245, 220));
// ...
 
//Add to your application controls.
Controls.Add(GdViewer1);
 
//Probably the GdViewer1 instance is disposed of automatically in your application,
//but you can still do it this way.
//GdViewer1.Dispose();
Inheritance Hierarchy

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         System.Windows.Forms.Control
            System.Windows.Forms.ScrollableControl
               System.Windows.Forms.ContainerControl
                  System.Windows.Forms.UserControl
                     GdPicture14.GdViewer

See Also

Reference

GdViewer Members
GdPicture14 Namespace
GdViewer Constructor
Dispose Method