home *** CD-ROM | disk | FTP | other *** search
- Attribute VB_Name = "View"
- Global Const VIEW_NORMAL = 100
- Global Const VIEW_STRETCH = 0
- Global Const VIEW_FIT = -1
-
- Global ZoomFactorX As Double
- Global ZoomFactorY As Double
-
- Sub ViewerInitTheForm(Frm As ViewFrm, Title$, FileName$, Page%, fPaintWL As Integer)
- Dim nPage As Integer
-
- Frm.Caption = Title
- Frm.Lead1.PaintDither = gDitheringType
- Frm.Lead1.PaintPalette = gPaintFixed
- Frm.Lead1.BitonalScaling = gBitonalType
- Frm.Lead1.AutoScroll = True
- Frm.Lead1.AutoRepaint = True
-
- If FileName <> "" Then
- If Page < 2 Then
- nPage = 1
- Else
- nPage = Page
- End If
-
- Frm.Lead1.PaintWhileLoad = fPaintWL
-
- On Error GoTo ErrorLoad
- Frm.Lead1.GetFileInfo FileName, nPage
-
- 'Use twips to position the control
- Frm.Lead1.ScaleMode = 1
-
- Frm.Width = Frm.Lead1.InfoWidth + DiffWidth
- Frm.Height = Frm.Lead1.InfoHeight + DiffHeight
- Frm.Lead1.left = 0
- Frm.Lead1.top = 0
- Frm.Lead1.Width = Frm.Lead1.InfoWidth
- Frm.Lead1.Height = Frm.Lead1.InfoHeight
- End If
- Exit Sub
-
- ErrorLoad:
- End Sub
-
-
-
-
-
-