'We assume that the GdViewer1 control has been properly integrated
'and your document has been properly displayed as well.
Dim left As Integer = 0, top As Integer = 0, width As Integer = 0, height As Integer = 0
GdViewer1.GetDisplayedArea(left, top, width, height)
Dim leftDoc As Integer = GdViewer1.GetDocumentLeft()
Dim topDoc As Integer = GdViewer1.GetDocumentTop()
MessageBox.Show("Page width (X): " + GdViewer1.PageWidth + vbCrLf + "Page height (Y): " + GdViewer1.PageHeight + vbCrLf + vbCrLf +
"Document: top-left point (X,Y): " + leftDoc + ", " + topDoc + vbCrLf +
"Displayed area:" + vbCrLf + " top-left point (X,Y): " + left + ", " + top + vbCrLf + " width: " + width + " height: " + height, "GdViewer.GetDocumentTop")
//We assume that the GdViewer1 control has been properly integrated
//and your document has been properly displayed as well.
int left = 0, top = 0, width = 0, height = 0;
GdViewer1.GetDisplayedArea(ref left, ref top, ref width, ref height);
int leftDoc = GdViewer1.GetDocumentLeft();
int topDoc = GdViewer1.GetDocumentTop();
MessageBox.Show("Page width (X): " + GdViewer1.PageWidth + "\nPage height (Y): " + GdViewer1.PageHeight + "\n\n" +
"Document: top-left point (X,Y): " + leftDoc + ", " + topDoc + "\n" +
"Displayed area:\n top-left point (X,Y): " + left + ", " + top + "\n width: " + width + " height: " + height, "GdViewer.GetDocumentTop");