GdPicture.NET.14
GdPicture14 Namespace / GdViewer Class / SetZoom100 Method
Example





In This Topic
SetZoom100 Method (GdViewer)
In This Topic
Adjusts the zoom (magnification) factor to be the 100% of the document displayed in the GdViewer control, in other words sets the current zoom factor to display the 100% of the loaded document.

This method sets the ZoomMode property to ViewerZoomMode.ZoomMode100 and refreshes the control as well.

Syntax
'Declaration
 
Public Function SetZoom100() As GdPictureStatus
public GdPictureStatus SetZoom100()
public function SetZoom100(): GdPictureStatus; 
public function SetZoom100() : GdPictureStatus;
public: GdPictureStatus SetZoom100(); 
public:
GdPictureStatus SetZoom100(); 

Return Value

A member of the GdPictureStatus enumeration. If the method has been successfully followed, then the return value is GdPictureStatus.OK. We strongly recommend always checking this status first.
Remarks
Just to inform you that if the ZoomMode property already has a value equal to ViewerZoomMode.ZoomMode100, this method does nothing.

Both the BeforeZoomChange and the AfterZoomChange events are raised using this method.

You can also try the Document Viewer Sample here to find out, how to utilize zooming features in your application.

Example
How to change the current zoom mode.
'We assume that the GdViewer1 control has been properly integrated.
            
'Determine the current zoom mode.
MessageBox.Show("The current zoom mode is " + GdViewer1.ZoomMode.ToString() + ".", "GdViewer.SetZoom100")
            
'Set the required zoom mode. The viewer will refresh.
GdViewer1.SetZoom100()
'It is the same as assigning GdViewer1.ZoomMode = ViewerZoomMode.ZoomMode100
//We assume that the GdViewer1 control has been properly integrated.
            
//Determine the current zoom mode.
MessageBox.Show("The current zoom mode is " + GdViewer1.ZoomMode.ToString()+ ".", "GdViewer.SetZoom100");
            
//Set the required zoom mode. The viewer will refresh.
GdViewer1.SetZoom100();
//It is the same as assigning GdViewer1.ZoomMode = ViewerZoomMode.ZoomMode100;
See Also