Example





In This Topic

Redraw() Method

In This Topic
Redraws the displayed document within the GdViewer control, that means refresh the displayed area of the viewer to show the currently loaded document, if any is defined.
Syntax
'Declaration
 
Public Function Redraw() As GdPictureStatus
public GdPictureStatus Redraw()
public function Redraw(): GdPictureStatus; 
public function Redraw() : GdPictureStatus;
public: GdPictureStatus Redraw(); 
public:
GdPictureStatus Redraw(); 

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
Please note that annotations are redrawn as well.
Example
How to redraw the currently loaded document in the viewer.
'We assume that the GdViewer1 control has been properly integrated.
If GdViewer1.DisplayFromFile("") = GdPictureStatus.OK Then
    'Do your stuff here ...
    GdViewer1.Clear()
    '...
    If GdViewer1.Redraw() <> GdPictureStatus.OK Then
        MessageBox.Show("The file can't be redrawn. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.Redraw")
    End If
End If
//We assume that the GdViewer1 control has been properly integrated.
if (GdViewer1.DisplayFromFile("") == GdPictureStatus.OK)
{
    //Do your stuff here ...
    GdViewer1.Clear();
    //...
    if (GdViewer1.Redraw() != GdPictureStatus.OK)
        MessageBox.Show("The file can't be redrawn. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.Redraw");
}
See Also