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

📄 paper.frm

📁 这个就不用多说了
💻 FRM
字号:
VERSION 5.00
Begin VB.Form paper 
   Appearance      =   0  'Flat
   BackColor       =   &H80000005&
   BorderStyle     =   0  'None
   Caption         =   "Form2"
   ClientHeight    =   6960
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   9075
   LinkTopic       =   "Form2"
   MDIChild        =   -1  'True
   ScaleHeight     =   6960
   ScaleWidth      =   9075
   ShowInTaskbar   =   0   'False
   Begin VB.PictureBox paper 
      AutoRedraw      =   -1  'True
      BackColor       =   &H80000009&
      Height          =   6975
      Left            =   0
      ScaleHeight     =   6915
      ScaleWidth      =   9075
      TabIndex        =   0
      Top             =   0
      Width           =   9135
   End
End
Attribute VB_Name = "paper"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim page As Integer
Dim col As Integer
Public state  As String
Public Total As Integer
Private Sub Form_Load()
Me.Width = Printer.Width
Me.Height = Printer.Height
P_page = 0
P_T = 500
P_B = 500
P_l = 500
P_R = 500

End Sub

Private Sub Form_Resize()
paper.Width = Me.Width
paper.Height = Me.Height

End Sub
Sub print_Title()

paper.FontName = "Arial"
paper.FontSize = 20 * P_Bl
paper.CurrentX = (paper.Width - paper.TextWidth(P_Bt)) / 2
paper.CurrentY = P_T * P_Bl
paper.Print P_Bt

paper.FontSize = 11 * P_Bl
paper.CurrentX = (paper.Width - paper.TextWidth("第" & P_page & "页") - 100 * P_Bl)
paper.Print "第" & P_page + 1 & "页"
End Sub
Sub printing(Grid As MSHFlexGrid)
Dim colX As Long
Dim rowY As Long
Dim Ks As Long '打印第一横线的开始高度
Dim Hs As Integer

paper.Cls
Call print_Title
paper.FontName = "Arial"
paper.FontSize = 11 * P_Bl
Ks = paper.CurrentY + 200 * P_Bl
Hs = ((paper.Height - Ks - P_B * P_Bl) / (Grid.CellHeight * P_Bl)) - 1
rowY = Ks

Total = Fix((Grid.Rows / Hs)) + 1

For n = P_page To Total
      paper.CurrentY = rowY
      col = P_page * Hs
      k1 = 0
   For k = col To Grid.Rows - 1
       colX = P_l * P_Bl
       Grid.Row = k
       For i = 0 To Grid.Cols - 1
           Grid.col = i
           paper.CurrentX = colX
           If Grid.CellWidth >= 280 Then
              If Grid.col = Grid.Cols - 1 Then
                 paper.Print Grid.Text
              Else
                 paper.Print Grid.Text;
              End If
        colX = Grid.CellWidth * P_Bl + colX
        End If
      Next
   rowY = Grid.CellHeight * P_Bl + rowY
   paper.Line (P_l * P_Bl, rowY)-(colX, rowY)
   k1 = k1 + 1
   If k1 = Hs Then
      Exit For
    End If
  Next
paper.Line (P_l * P_Bl, Ks)-(colX, Ks)
colX = P_l * P_Bl
For i = 0 To Grid.Cols - 1
     Grid.col = i
    paper.Line (colX, Ks)-(colX, rowY)
    colX = Grid.CellWidth * P_Bl + colX
Next
paper.Line (colX, Ks)-(colX, rowY)
paper.CurrentX = paper.Width / 2

    Exit Sub


Next

End Sub

⌨️ 快捷键说明

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