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

📄 jbbpreveiw.frm

📁 酒店管理系统
💻 FRM
📖 第 1 页 / 共 3 页
字号:
      Left            =   240
      TabIndex        =   9
      Top             =   1800
      Width           =   735
   End
   Begin VB.Label Label2 
      Caption         =   " "
      Height          =   375
      Index           =   1
      Left            =   240
      TabIndex        =   8
      Top             =   1440
      Width           =   735
   End
   Begin VB.Label Label2 
      Caption         =   " "
      Height          =   375
      Index           =   0
      Left            =   240
      TabIndex        =   7
      Top             =   1080
      Width           =   735
   End
End
Attribute VB_Name = "JBBPREVIEW"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim Xx, Yy, Xx1, Yy1
Dim cx, cy
Dim Sr
Dim p As New PrnCls
Dim START As Long, STRPRINT As String, BZTOP As Long, STRFH As String

Private Sub Check1_Click()
    Toolbar1_ButtonClick Toolbar1.Buttons(2)
End Sub

Private Sub Combo1_Validate(Cancel As Boolean)
    Toolbar1_ButtonClick Toolbar1.Buttons(2)
End Sub

Private Sub Form_Activate()
    Toolbar1_ButtonClick Toolbar1.Buttons(2)
    
End Sub

Private Sub Form_Load()
    Combo1.AddItem ("0.25")
    Combo1.AddItem ("0.5")
    Combo1.AddItem ("1")
    Combo1.AddItem ("2")
    Combo1.AddItem ("3")
    RQ.Caption = Format(Now, "LONG DATE")
End Sub
Private Sub Form_Resize()
    With preview1
        .Width = IIf(ScaleWidth - (.left) * 2 > 0, ScaleWidth - (.left) * 2, 0)
        .Height = IIf(ScaleHeight - .top > 0, ScaleHeight - .top, 0)
        preview1.Refresh
    End With
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
    'LABEL2(?) 现金收入
    'LABEL3(?) 赊欠收入
    'LABEL4(?) 当日累计
    'LABEL5(?) 当月累计
    'TITLE.CAPTION  报表标题
    'BZJLJ.CAPTION  累收保证金
    'RQ.CAPTION     报告日期
    'BT1.CAPTION    本日(月)合计
    'BT2.CAPTION    本日(月)累计
    
    If Button = "退出" Then
       Unload Me
       Exit Sub
    End If
    Dim X
    Dim psm
    Dim zm

    On Error GoTo EXITERROR
    
    zm = Val(Combo1.Text)
    Sr = 1440
    If Button = "打印" Then
       CommonDialog1.ShowPrinter
       p.PrintStartDoc Printer, zm
    End If
    If Button = "预览" Then
       p.PrintStartDoc preview1, zm
    End If
    p.ForeColor = &H0&
    p.ForeColor = &HFF0000
    p.CurrentY = 1.2 * Sr
    
    p.CurrentX = 1.5 * Sr
    p.FontName = "宋体"
    p.FontItalic = True
    p.FontSize = 12
    p.PrintPrint STRBGNAME
    p.CurrentX = 2.2 * Sr
    p.CurrentY = p.CurrentY - 240.485 / 2
    p.FontSize = 18
    p.FontItalic = False
    p.PrintPrint TITLE.Caption
    p.NewLineBG 0
    p.PrintLine p.CurrentX + 1.5 * Sr, p.CurrentY + 100, p.CurrentX + 1.5 * Sr + 4000, p.CurrentY + 100
    p.PrintLine p.CurrentX - 4000, p.CurrentY + 50, p.CurrentX, p.CurrentY + 50
    p.NewLineBG 0
    p.CurrentX = 2.2 * Sr
    p.CurrentY = p.CurrentY + 100
    p.FontSize = 11
    p.PrintPrint "日期:" & RQ.Caption & Space(14) & "金额单位:元"
    p.NewLineBG 0
    p.CurrentY = p.CurrentY + 80
    p.CurrentX = 200
    p.BoxOut "项    目", 1350, "C", 300, "1111"
    p.BoxOut "现金收入", 1400, "C", 300, "1111"
    p.BoxOut "赊欠收入", 1400, "C", 300, "1111"
    p.BoxOut BT1.Caption, 1400, "C", 300, "1111"
    p.BoxOut BT2.Caption, 1400, "C", 300, "1111"
    p.BoxOut "备    注", 1400, "C", 300, "1111"
    p.NewLineBG 0
    p.CurrentX = 200
    p.CurrentY = p.CurrentY + 300
    p.BoxOut "客", 490, "C", 200, "1010"
    p.BoxOut "房租费", 850, "C", 200, "1111"
    p.BoxOut Label2(0).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label3(0).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label4(0).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label5(0).Caption, 1400, "R", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.NewLineBG 0
    p.CurrentX = 200
    p.CurrentY = p.CurrentY + 200
    p.BoxOut "房", 490, "C", 200, "1010"
    p.BoxOut "商  品", 850, "C", 200, "1111"
    p.BoxOut Label2(1).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label3(1).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label4(1).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label5(1).Caption, 1400, "R", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.NewLineBG 0
    p.CurrentX = 200
    p.CurrentY = p.CurrentY + 200
    p.BoxOut "部", 490, "C", 200, "1011"
    p.BoxOut "加床费", 850, "C", 200, "1111"
    p.BoxOut Label2(2).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label3(2).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label4(2).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label5(2).Caption, 1400, "R", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.NewLineBG 0
    p.CurrentX = 200
    p.CurrentY = p.CurrentY + 200
    p.BoxOut "膳", 490, "C", 200, "1010"
    p.BoxOut "餐饮费", 850, "C", 200, "1111"
    p.BoxOut Label2(3).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label3(3).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label4(3).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label5(3).Caption, 1400, "R", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.NewLineBG 0
    p.CurrentX = 200
    p.CurrentY = p.CurrentY + 200
    p.BoxOut "食", 490, "C", 200, "1010"
    p.BoxOut "酒  水", 850, "C", 200, "1111"
    p.BoxOut Label2(4).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label3(4).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label4(4).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label5(4).Caption, 1400, "R", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.NewLineBG 0
    p.CurrentX = 200
    p.CurrentY = p.CurrentY + 200
    p.BoxOut "停  车", 1350, "C", 200, "1111"
    p.BoxOut Label2(5).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label3(5).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label4(5).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label5(5).Caption, 1400, "R", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.NewLineBG 0
    p.CurrentX = 200
    p.CurrentY = p.CurrentY + 200
    p.BoxOut "电话费", 1350, "C", 200, "1111"
    p.BoxOut Label2(6).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label3(6).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label4(6).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label5(6).Caption, 1400, "R", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.NewLineBG 0
    p.CurrentX = 200
    p.CurrentY = p.CurrentY + 200
    p.BoxOut "会  议", 1350, "C", 200, "1111"
    p.BoxOut Label2(7).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label3(7).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label4(7).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label5(7).Caption, 1400, "R", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.NewLineBG 0
    p.CurrentX = 200
    p.CurrentY = p.CurrentY + 200
    p.BoxOut "商务费", 1350, "C", 200, "1111"
    p.BoxOut Label2(8).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label3(8).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label4(8).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label5(8).Caption, 1400, "R", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.NewLineBG 0
    p.CurrentX = 200
    p.CurrentY = p.CurrentY + 200
    p.BoxOut "舞  厅", 1350, "C", 200, "1111"
    p.BoxOut Label2(9).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label3(9).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label4(9).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label5(9).Caption, 1400, "R", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.NewLineBG 0
    p.CurrentX = 200
    p.CurrentY = p.CurrentY + 200
    p.BoxOut "酒  吧", 1350, "C", 200, "1111"
    p.BoxOut Label2(10).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label3(10).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label4(10).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label5(10).Caption, 1400, "R", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.NewLineBG 0
    p.CurrentX = 200
    p.CurrentY = p.CurrentY + 200
    p.BoxOut "旅游费", 1350, "C", 200, "1111"
    p.BoxOut Label2(11).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label3(11).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label4(11).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label5(11).Caption, 1400, "R", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.NewLineBG 0
    p.CurrentX = 200
    p.CurrentY = p.CurrentY + 200
    p.BoxOut "赔偿费", 1350, "C", 200, "1111"
    p.BoxOut Label2(12).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label3(12).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label4(12).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label5(12).Caption, 1400, "R", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.NewLineBG 0
    p.CurrentX = 200
    p.CurrentY = p.CurrentY + 200
    p.BoxOut "其  他", 1350, "C", 200, "1111"
    p.BoxOut Label2(13).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label3(13).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label4(13).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label5(13).Caption, 1400, "R", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.NewLineBG 0
    p.CurrentX = 200
    p.CurrentY = p.CurrentY + 200
    p.BoxOut "", 1350, "C", 200, "1111"
    p.BoxOut "", 1400, "R", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.BoxOut "", 1400, "R", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.NewLineBG 0
    p.CurrentX = 200
    p.CurrentY = p.CurrentY + 200
    p.BoxOut "", 1350, "C", 200, "1111"
    p.BoxOut "", 1400, "R", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.BoxOut "", 1400, "R", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.NewLineBG 0
    p.CurrentX = 200
    p.CurrentY = p.CurrentY + 200
    p.BoxOut "", 1350, "C", 200, "1111"
    p.BoxOut "", 1400, "R", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.BoxOut "", 1400, "R", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.NewLineBG 0
    p.CurrentX = 200
    p.CurrentY = p.CurrentY + 200
    p.BoxOut "", 1350, "C", 200, "1111"
    p.BoxOut "", 1400, "R", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.BoxOut "", 1400, "R", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.NewLineBG 0
    p.CurrentX = 200
    p.CurrentY = p.CurrentY + 200
    p.BoxOut "", 1350, "C", 200, "1111"
    p.BoxOut "", 1400, "R", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.BoxOut "", 1400, "R", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.NewLineBG 0
    p.CurrentX = 200
    p.CurrentY = p.CurrentY + 200
    p.BoxOut "", 1350, "C", 200, "1111"
    p.BoxOut "", 1400, "R", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.BoxOut "", 1400, "R", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.NewLineBG 0
    p.CurrentX = 200
    p.CurrentY = p.CurrentY + 200
    p.BoxOut "合  计", 1350, "C", 200, "1111"
    p.BoxOut Label2(14).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label3(14).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label4(14).Caption, 1400, "R", 200, "1111"
    p.BoxOut Label5(14).Caption, 1400, "R", 200, "1111"
    p.BoxOut "", 1400, "C", 200, "1111"
    p.NewLineBG 0
    p.CurrentX = 200
    p.CurrentY = p.CurrentY + 200
    p.BoxOut "累收保证金", 1350, "C", 200, "1111"
    p.BoxOut BZJLJ.Caption, 7040, "L", 200, "1111"
    p.NewLineBG 0
    p.CurrentX = 400
    p.CurrentY = p.CurrentY + 300
    p.PrintPrint "负责人:                   制表:" & frmLogin.CZYXM & Space(8 - LenB(frmLogin.CZYXM)) & "                  总1页第1页"
    p.NewLine
    p.NewLine
    p.NewLine
    p.EndDoc
    Exit Sub
    
EXITERROR:
    If Err.Number = 32755 Then
        Exit Sub
        Else
          MsgBox CStr(Err.Number) & "-" & Err.Description, vbCritical, "错误信息"
          Exit Sub
    End If

End Sub

Private Sub Toolbar1_ButtonMenuClick(ByVal ButtonMenu As MSComctlLib.ButtonMenu)
    If ButtonMenu = "25%" Then
       Combo1.Text = "0.25"
       Else
         If ButtonMenu = "50%" Then
            Combo1.Text = "0.5"
            Else
              If ButtonMenu = "100%" Then
                 Combo1.Text = "1"
                 Else
                   If ButtonMenu = "200%" Then
                      Combo1.Text = "2"
                      Else
                        If ButtonMenu = "300%" Then
                           Combo1.Text = "3"
                        End If
                   End If
              End If
         End If
    End If

    Toolbar1_ButtonClick Toolbar1.Buttons(2)
End Sub

⌨️ 快捷键说明

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