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

📄 frmstyleedit.frm

📁 图书管理系统,用VB做的,可以使用,用于课程设计
💻 FRM
字号:
VERSION 5.00
Begin VB.Form FrmStyleEdit 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "图书资料信息编辑"
   ClientHeight    =   2760
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   6345
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2760
   ScaleWidth      =   6345
   StartUpPosition =   2  '屏幕中心
   Begin VB.Frame Frame1 
      Height          =   1815
      Left            =   240
      TabIndex        =   6
      Top             =   120
      Width           =   5895
      Begin VB.TextBox txtDescribe 
         Height          =   375
         Left            =   1200
         MaxLength       =   100
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   3
         Top             =   960
         Width           =   3615
      End
      Begin VB.TextBox txtName 
         Height          =   270
         Left            =   1200
         MaxLength       =   100
         TabIndex        =   0
         Top             =   210
         Width           =   4455
      End
      Begin VB.TextBox txtArea1 
         Height          =   270
         Left            =   1200
         MaxLength       =   200
         TabIndex        =   1
         Top             =   570
         Width           =   975
      End
      Begin VB.TextBox txtArea2 
         Height          =   270
         Left            =   3720
         MaxLength       =   20
         TabIndex        =   2
         Top             =   570
         Width           =   1935
      End
      Begin VB.Label Label7 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "出版社"
         Height          =   180
         Left            =   240
         TabIndex        =   10
         Top             =   1080
         Width           =   540
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "图书名称"
         Height          =   180
         Left            =   240
         TabIndex        =   9
         Top             =   240
         Width           =   720
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "编号"
         Height          =   180
         Left            =   240
         TabIndex        =   8
         Top             =   615
         Width           =   360
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "出版日期"
         Height          =   180
         Left            =   2880
         TabIndex        =   7
         Top             =   615
         Width           =   720
      End
   End
   Begin VB.CommandButton Cmd_OK 
      Caption         =   "确 定"
      Height          =   400
      Left            =   1517
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   4
      Top             =   2160
      Width           =   1300
   End
   Begin VB.CommandButton Cmd_Cancel 
      Cancel          =   -1  'True
      Caption         =   "取 消"
      Height          =   400
      Left            =   3677
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   5
      Top             =   2160
      Width           =   1300
   End
End
Attribute VB_Name = "FrmStyleEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean
Public OriId As Long
Public OriName As String

Private Sub Cmd_OK_Click()
  '检查数据的有效性
  If Trim(txtName) = "" Then
    MsgBox "请输入户型名称"
    txtName.SetFocus
    Exit Sub
  End If
  '把用户录入的数据赋值到MyStyle对象中
  With MyStyle
  .StyleName = Trim(txtName)
  .Area1 = Val(txtArea1)
  .Area2 = Val(txtArea2)
  .Memos = Trim(txtDescribe)
  '判断户型名称是否存在
  If Modify = False Or OriName <> Trim(txtName) Then
    If .In_DB(Trim(txtName)) = True Then
      MsgBox "户型名称已经存在,请重新输入"
      txtName.SetFocus
      txtName.SelStart = 0
      txtName.SelLength = Len(txtName)
      Exit Sub
    End If
  End If
  '根据变量Modify的值决定是插入新数据还是修改已有的数据
  If Modify = False Then
    .Insert
    MsgBox "添加成功"
  Else
    .Update (OriId)
    MsgBox "修改成功"
  End If
  End With
  '关闭窗体
  Unload Me
End Sub

Private Sub Cmd_Cancel_Click()
  Unload Me
End Sub

⌨️ 快捷键说明

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