Description
Displays an input box to enter the zoom percentage on the Pages main tab in Fred.
Syntax
ViewZoomPctDlg |
Code
Public Sub ViewZoomPctDlg()
Dim iZoom As String
Dim iMinZoom, iMaxZoom As Integer
iZoom = CStr(Page.GetViewZoom)
Dim iZoomX As Long = Page.ViewGetMetrics(0)
Dim iZoomY As Long = Page.ViewGetMetrics(1)
iMinZoom = 8
iMaxZoom = 6700
Do While 1 = 1
iZoom = InputBox(My.Resources.IDS_SetZoom, My.Resources.IDS_Zoom, iZoom)
If IsNumeric(iZoom) Then
If ((CInt(iZoom)) > 4 And (CInt(iZoom)) < 6701) Then
Page.ViewZoomPct(CInt(iZoom))
Page.ViewPositionAt(iZoomX, iZoomY, False)
Exit Do
End If
Else
If iZoom = "" Then Exit Do
MsgBox(My.Resources.IDS_ErrZoom, vbExclamation, My.Resources.IDS_Zoom)
End If
Loop
End Sub
See also