⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmprv.frm

📁 用于三次采油技术的经济评价
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Height          =   615
         Left            =   8280
         TabIndex        =   1
         Top             =   120
         Width           =   855
         _Version        =   65536
         _ExtentX        =   1508
         _ExtentY        =   1085
         _StockProps     =   15
         Caption         =   "百分比:"
         BackColor       =   12632256
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "黑体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BorderWidth     =   1
         BevelOuter      =   0
         Font3D          =   1
      End
   End
End
Attribute VB_Name = "FrmPrv"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
'Option Explicit
    


Private Sub Combo1_Click()
vp.Zoom = Val(Combo1.List(Combo1.ListIndex))
'DoDocument
End Sub


Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyEscape Then
Unload Me
Me.Hide
End If
End Sub
Private Sub ZwDrawPic()
With vp

    .StartDoc
           ' .SpaceBefore = "1 in"
           '.SpaceAfter = 20 '100 '300
            '.IndentLeft = 2000 '100 '0
            .Font.Name = "宋体"
            .Font.Size = 20
            .FontBold = True
            .TextAlign = taCenterMiddle
   ' .Paragraph = FrmListOutput!label1.Caption
           .x1 = 200
            
            .x2 = 10900
            b = .x2 - .x1: bl = frmoutput!Image1.Height / frmoutput!Image1.Width
            .y1 = vp.CurrentY
             .y2 = .y1 + b * bl
            '.y2 = vp.PageHeight - vp.MarginBottom
            
        'Set .Picture = frmoutput.Image1.Picture & "<HR>"
          Set .Picture = frmoutput.Image1.Picture
          .y1 = 6800
          .y2 = 6800 + 6841
          Set .Picture = frmoutput.Image2.Picture
        'vp.NewPage
        'Set .Picture = frmoutput.Image2.Picture
        vp.NewPage
        .y1 = 195
          .y2 = 7043
        Set .Picture = frmoutput.Image3.Picture
         .y1 = 6800
          .y2 = 6800 + 6841
        Set .Picture = frmoutput.Image4.Picture
        vp.NewPage
        .y1 = 195
          .y2 = 7043
        Set .Picture = frmoutput.Image5.Picture
       .y1 = 6800
          .y2 = 6800 + 6841
        Set .Picture = frmoutput.Image6.Picture
         .EndDoc
       
         .Font.Name = "宋体"
            .FontSize = 8
            .Font.Bold = False
            .Font.Italic = False
            .Font.Underline = False
            .TextColor = vbBlack
            .TextAlign = taLeftTop
    End With
End Sub
Private Sub Form_Load()
'Me.Show
On Error GoTo erro1

 MousePointer = vbHourglass
    
    'vp.Top = Toolbar1.Height
   ' Vp.Width = FrmPrv.Width
    vp.Height = FrmPrv.Height + 800
       
    Combo1.ListIndex = 1
    
  If CellOrPic = True Then
   DoDocument
  Else
    ZwDrawPic
    
   End If
    MousePointer = vbDefault
erro1:
Exit Sub
End Sub
Private Sub DoDocument()

MousePointer = vbHourglass


With vp
 .StartDoc
           
      '   For iChapter = 1 To 3
        
            ' print chapter title
            '.SpaceBefore = "1 in"
            '.SpaceAfter = 20 '100 '300
            '.IndentLeft = 20 '100 '0
            .Font.Name = "宋体"
            .Font.Size = 20
            .FontBold = True
            .TextAlign = taCenterTop
            
            .Paragraph = "三次采油经济评价"
        
            ' print chapter text
            .SpaceBefore = 0
            .SpaceAfter = 100 '300
            .IndentLeft = 100 '300
            .Font.Name = "宋体"
            .FontSize = 8
            .Font.Bold = False
            .Font.Italic = False
            .Font.Underline = False
            .TextColor = vbBlack
            .TextAlign = taLeftTop
            ' HTML text
                VPRenderHTML vp, " " & ZwStringGrid 'ZWstringHtml
                
 MousePointer = vbDefault
 .EndDoc
 
 
 
End With
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
MousePointer = vbDefault
ZwStringGrid = ""
CellOrPic = True
'frmoutput.SetFocus
End Sub




Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
  Select Case Button.Index
  Case 2
 
 
  If vp.PrintDialog(pdPrinterSetup) = True Then
        If CellOrPic = True Then
         DoDocument
        Else
          ZwDrawPic
         End If
   vp.PrintDoc
   End If
  Case 3
  If CellOrPic = True Then
         DoDocument
        Else
          ZwDrawPic
         End If
  
  Case 4
  If vp.PrintDialog(pdPageSetup) = True Then
    If CellOrPic = True Then
         DoDocument
        Else
          ZwDrawPic
         End If
    
  End If
 
  Case 5
  MsgBox "5"
  
  Case 7
   vp.PreviewPage = 1
   Toolbar1.Buttons.Item(7).Enabled = False
   Toolbar1.Buttons.Item(8).Enabled = False
   Toolbar1.Buttons.Item(9).Enabled = True
   Toolbar1.Buttons.Item(10).Enabled = True
   
  Case 8

        With vp
              ' if last page disable button
              If .PreviewPage = 1 Then
                 Toolbar1.Buttons.Item(8).Enabled = False
                 Toolbar1.Buttons.Item(7).Enabled = False
                 Toolbar1.Buttons.Item(9).Enabled = True
                 Toolbar1.Buttons.Item(10).Enabled = True
                  Exit Sub
              End If
              .PreviewPage = .PreviewPage - 1
              Toolbar1.Buttons.Item(9).Enabled = True
              Toolbar1.Buttons.Item(10).Enabled = True
          End With
 Case 9
        With vp
              ' if last page disable button
              If .PreviewPage = .PageCount Then
                  Toolbar1.Buttons.Item(7).Enabled = True
                  Toolbar1.Buttons.Item(8).Enabled = True
                  Toolbar1.Buttons.Item(9).Enabled = False
                  Toolbar1.Buttons.Item(10).Enabled = False
                  Exit Sub
              End If
              .PreviewPage = .PreviewPage + 1
              Toolbar1.Buttons.Item(7).Enabled = True
              Toolbar1.Buttons.Item(8).Enabled = True
              
         End With
  Case 10
         vp.PreviewPage = vp.PageCount
         Toolbar1.Buttons.Item(7).Enabled = True
         Toolbar1.Buttons.Item(8).Enabled = True
         Toolbar1.Buttons.Item(9).Enabled = False
         Toolbar1.Buttons.Item(10).Enabled = False
 Case 12
       Unload Me
       
 End Select
  

  
End Sub

Private Sub Toolbar1_ButtonMenuClick(ByVal ButtonMenu As MSComctlLib.ButtonMenu)

Select Case ButtonMenu.Index

Case 1
              Combo1.Enabled = False
              vp.ZoomMode = zmTwoPages
Case 2
              Combo1.Enabled = False
              vp.ZoomMode = zmWholePage
Case 3
              Combo1.Enabled = True
              vp.ZoomMode = zmPercentage
Case 4
              Combo1.Enabled = True
              vp.ZoomMode = zmThumbnail
End Select
If CellOrPic = True Then
   DoDocument
  Else
    ZwDrawPic
   End If

End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -