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

📄 图书销售.frm

📁 这是一个有关记录图书销售的程序,可以记录图书的销售情况,并计算销售总额.
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   AutoRedraw      =   -1  'True
   Caption         =   "图书销售"
   ClientHeight    =   3540
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   7350
   LinkTopic       =   "Form1"
   ScaleHeight     =   3540
   ScaleWidth      =   7350
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command3 
      Caption         =   "计算器"
      Height          =   495
      Left            =   6120
      TabIndex        =   7
      Top             =   2160
      Width           =   855
   End
   Begin VB.CommandButton Command2 
      Caption         =   "合计"
      Height          =   495
      Left            =   6120
      TabIndex        =   6
      Top             =   1320
      Width           =   855
   End
   Begin VB.CommandButton Command1 
      Caption         =   "购买"
      Height          =   495
      Left            =   6120
      TabIndex        =   5
      Top             =   600
      Width           =   855
   End
   Begin VB.PictureBox Picture1 
      AutoRedraw      =   -1  'True
      Height          =   2055
      Left            =   360
      ScaleHeight     =   1995
      ScaleWidth      =   5235
      TabIndex        =   4
      Top             =   1200
      Width           =   5295
   End
   Begin VB.TextBox Text3 
      Alignment       =   1  'Right Justify
      Height          =   375
      Left            =   4800
      TabIndex        =   3
      Top             =   600
      Width           =   855
   End
   Begin VB.TextBox Text2 
      Alignment       =   1  'Right Justify
      Height          =   375
      Left            =   3480
      TabIndex        =   2
      Top             =   600
      Width           =   855
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   360
      TabIndex        =   1
      Top             =   600
      Width           =   2775
   End
   Begin VB.Label Label1 
      Caption         =   "书名                     单价           数量"
      Height          =   255
      Left            =   1440
      TabIndex        =   0
      Top             =   240
      Width           =   4215
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim sum As Single
Private Sub Command1_Click()
If IsNumeric(Text2.Text) And IsNumeric(Text3.Text) Then
    Picture1.Print Text1.Text,
    Picture1.Print Format(Val(Text2.Text), "###.00"),
    Picture1.Print Format(Val(Text3.Text), "####"),
    s = Val(Text2) * Val(Text3)
    sum = sum + s
    Picture1.Print Format(s, "$##,###.00")
Else
    If Not IsNumeric(Text2.Text) Then
        Text2.SetFocus
    Else
        Text3.SetFocus
    End If
End If
End Sub

Private Sub Command2_Click()
Picture1.Print String(52, "-")
Picture1.Print "合计" + Space(38) + Format(sum, "$###,###.00")
Picture1.Print
Picture1.Print Tab(35); "日期:" + Format(Now, "dddddd")
End Sub

Private Sub Command3_Click()
f = Shell("c:\windows\System32\calc.exe", 1)
End Sub

Private Sub Form_Load()
sum = 0
End Sub

⌨️ 快捷键说明

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