www.pudn.com > PDFView.rar > pdfviewer.frm, change:2009-06-29,size:7305b


VERSION 5.00 
Object = "{67D235FE-3459-4C6E-B730-5C5028FBBC25}#1.0#0"; "pdfview.ocx" 
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx" 
Begin VB.Form Form1  
   Caption         =   "PDF阅读控件示例(VeryPDF PDFView OCX)" 
   ClientHeight    =   8670 
   ClientLeft      =   60 
   ClientTop       =   450 
   ClientWidth     =   12075 
   LinkTopic       =   "Form1" 
   ScaleHeight     =   8670 
   ScaleWidth      =   12075 
   StartUpPosition =   3  '窗口缺省 
   Begin VB.CommandButton ZoomOut  
      Caption         =   "缩小" 
      Height          =   375 
      Left            =   10080 
      TabIndex        =   16 
      Top             =   3360 
      Width           =   1815 
   End 
   Begin VB.CommandButton SetSearchText  
      Caption         =   "设置查找字符" 
      Height          =   495 
      Left            =   10080 
      TabIndex        =   15 
      Top             =   6360 
      Width           =   1815 
   End 
   Begin MSComDlg.CommonDialog CommonDialog1  
      Left            =   9840 
      Top             =   0 
      _ExtentX        =   847 
      _ExtentY        =   847 
      _Version        =   393216 
   End 
   Begin VB.CommandButton SearchPrevious  
      Caption         =   "查找上一个" 
      Height          =   375 
      Left            =   10080 
      TabIndex        =   14 
      Top             =   7440 
      Width           =   1815 
   End 
   Begin VB.CommandButton SearchNext  
      Caption         =   "查找下一个" 
      Height          =   375 
      Left            =   10080 
      TabIndex        =   13 
      Top             =   6960 
      Width           =   1815 
   End 
   Begin VB.TextBox SearchText  
      Height          =   375 
      Left            =   10080 
      TabIndex        =   11 
      Text            =   "Text1" 
      Top             =   5880 
      Width           =   1815 
   End 
   Begin VB.CommandButton RotateRight  
      Caption         =   "向右旋转" 
      Height          =   375 
      Left            =   10080 
      TabIndex        =   10 
      Top             =   4800 
      Width           =   1815 
   End 
   Begin VB.CommandButton RotateLeft  
      Caption         =   "向左旋转" 
      Height          =   375 
      Left            =   10080 
      TabIndex        =   9 
      Top             =   4320 
      Width           =   1815 
   End 
   Begin VB.CommandButton ViewMode  
      Caption         =   "视图模式" 
      Height          =   375 
      Left            =   10080 
      TabIndex        =   8 
      Top             =   3840 
      Width           =   1815 
   End 
   Begin VB.CommandButton ZoomIn  
      Caption         =   "放大" 
      Height          =   375 
      Left            =   10080 
      TabIndex        =   7 
      Top             =   2880 
      Width           =   1815 
   End 
   Begin VB.CommandButton FitWidth  
      Caption         =   "合适宽度" 
      Height          =   375 
      Left            =   10080 
      TabIndex        =   6 
      Top             =   2400 
      Width           =   1815 
   End 
   Begin VB.CommandButton FitPage  
      Caption         =   "合适页面" 
      Height          =   375 
      Left            =   10080 
      TabIndex        =   5 
      Top             =   1920 
      Width           =   1815 
   End 
   Begin VB.CommandButton ActualSize  
      Caption         =   "实际大小" 
      Height          =   375 
      Left            =   10080 
      TabIndex        =   4 
      Top             =   1440 
      Width           =   1815 
   End 
   Begin VB.CommandButton PreviousPage  
      Caption         =   "上一页" 
      Height          =   375 
      Left            =   10080 
      TabIndex        =   3 
      Top             =   960 
      Width           =   1815 
   End 
   Begin VB.CommandButton NextPage  
      Caption         =   "下一页" 
      Height          =   375 
      Left            =   10080 
      TabIndex        =   2 
      Top             =   480 
      Width           =   1815 
   End 
   Begin VB.CommandButton Open  
      Caption         =   "打开PDF" 
      Height          =   375 
      Left            =   10080 
      TabIndex        =   1 
      Top             =   0 
      Width           =   1815 
   End 
   Begin PDFVIEWLib.Pdfview PDFViewOCX  
      Height          =   8655 
      Left            =   0 
      TabIndex        =   0 
      Top             =   0 
      Width           =   9735 
      _Version        =   65536 
      _ExtentX        =   17171 
      _ExtentY        =   15266 
      _StockProps     =   0 
   End 
   Begin VB.Label SearchString  
      Caption         =   "查找字符串:" 
      Height          =   255 
      Left            =   10080 
      TabIndex        =   12 
      Top             =   5400 
      Width           =   1815 
   End 
End 
Attribute VB_Name = "Form1" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
'**************************************************************************** 
'人人为我,我为人人 
'枕善居汉化收藏整理 
'发布日期:2009/06/29 
'描    述:PDF阅读控件示例(VeryPDF PDFView OCX) 
'网    站:http://www.Mndsoft.com/  (VB6源码博客) 
'网    站:http://www.VbDnet.com/   (VB.NET源码博客,主要基于.NET2005) 
'e-mail  :Mndsoft@163.com 
'e-mail  :Mndsoft@126.com 
'OICQ    :88382850 
'          如果您有新的好的代码别忘记给枕善居哦! 
'**************************************************************************** 
 
Dim nViewMode As Integer 
Private Sub ActualSize_Click() 
  PDFViewOCX.ZoomActualPage 
End Sub 
 
Private Sub FitPage_Click() 
  PDFViewOCX.ZoomFitPage 
End Sub 
 
Private Sub FitWidth_Click() 
  PDFViewOCX.ZoomFitWidth 
End Sub 
 
Private Sub Form_Load() 
PDFViewOCX.SetRegCode "VERYPDF-PDFVIEWEROCX-08102820"   '完美使用注册码 
End Sub 
 
Private Sub NextPage_Click() 
  PDFViewOCX.ViewNextPage 
End Sub 
 
Private Sub Open_Click() 
  On Error GoTo EH 
  CommonDialog1.CancelError = True 
  CommonDialog1.Filter = "PDF Files (*.pdf)|*.pdf|" 
  CommonDialog1.ShowOpen 
  PDFViewOCX.OpenPDF CommonDialog1.FileName, "", "" 
  nViewMode = 0 
EH: 
 
End Sub 
 
Private Sub PreviousPage_Click() 
  PDFViewOCX.ViewPreviousPage 
End Sub 
 
 
Private Sub RotateLeft_Click() 
    PDFViewOCX.RotateViewLeft 
End Sub 
 
Private Sub RotateRight_Click() 
    PDFViewOCX.RotateViewRight 
End Sub 
 
Private Sub SearchNext_Click() 
    PDFViewOCX.FindNextText 
End Sub 
 
Private Sub SearchPrevious_Click() 
    PDFViewOCX.FindPreviousText 
End Sub 
 
Private Sub SetSearchText_Click() 
    PDFViewOCX.SetFindText SearchText.Text 
End Sub 
 
Private Sub ViewMode_Click() 
    If nViewMode = 0 Then 
        PDFViewOCX.ViewModeSinglePage 
    ElseIf nViewMode = 1 Then 
        PDFViewOCX.ViewModeFacing 
    ElseIf nViewMode = 2 Then 
        PDFViewOCX.ViewModeContinuous 
    ElseIf nViewMode = 3 Then 
        PDFViewOCX.ViewModeContinuousFacing 
    End If 
    nViewMode = nViewMode + 1 
    If nViewMode >= 4 Then 
        nViewMode = 0 
    End If 
   
End Sub 
 
Private Sub ZoomRatio_Click() 
  PDFViewOCX.Zoom 100 
End Sub 
 
Private Sub ZoomIn_Click() 
  PDFViewOCX.ZoomIn 
End Sub 
 
Private Sub ZoomOut_Click() 
  PDFViewOCX.ZoomOut 
End Sub