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





In This Topic
GetVScrollBarMaxPosition Method (GdViewer)
In This Topic
Gets a maximum available position of the vertical scrollbar, in pixels, related to the document currently displayed in the GdViewer control. That said, it is a maximum coordinate on the vertical axis, which the vertical scrollbar can reach on the displayed document according to the current control settings.
Syntax
'Declaration
 
Public Function GetVScrollBarMaxPosition() As Integer
public int GetVScrollBarMaxPosition()
public function GetVScrollBarMaxPosition(): Integer; 
public function GetVScrollBarMaxPosition() : int;
public: int GetVScrollBarMaxPosition(); 
public:
int GetVScrollBarMaxPosition(); 

Return Value

A maximum coordinate on the vertical axis accessible for the vertical scrollbar, in pixels.
Remarks
You can regularly apply the GetStat method to determine if this method has been successful.
Example
How to set the scrollbar to its maximum available position to allow to display the bottom right corner of the document.
'We assume that the GdViewer1 control has been properly integrated
'and your document has been properly displayed as well.
If GdViewer1.HScrollVisible OrElse GdViewer1.VScrollVisible Then
    GdViewer1.SetHVScrollBarPosition(GdViewer1.GetHScrollBarMaxPosition(), GdViewer1.GetVScrollBarMaxPosition())
End If
//We assume that the GdViewer1 control has been properly integrated
//and your document has been properly displayed as well.
if (GdViewer1.HScrollVisible || GdViewer1.VScrollVisible)
    GdViewer1.SetHVScrollBarPosition(GdViewer1.GetHScrollBarMaxPosition(), GdViewer1.GetVScrollBarMaxPosition());
See Also