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

📄 form21.frm

📁 我的毕业设计课题为“光盘管理系统”
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form Form21 
   Caption         =   "Form21"
   ClientHeight    =   6180
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   11595
   LinkTopic       =   "Form21"
   ScaleHeight     =   6180
   ScaleWidth      =   11595
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox Text1 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   480
      TabIndex        =   10
      Top             =   2040
      Width           =   1575
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   495
      Left            =   600
      TabIndex        =   9
      Top             =   3600
      Width           =   1215
   End
   Begin VB.TextBox Text2 
      DataField       =   "盘名"
      DataSource      =   "Adodc1"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Index           =   0
      Left            =   3840
      TabIndex        =   7
      Top             =   1800
      Width           =   1935
   End
   Begin VB.TextBox Text2 
      DataField       =   "套号"
      DataSource      =   "Adodc1"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Index           =   1
      Left            =   3840
      TabIndex        =   6
      Top             =   2640
      Width           =   1935
   End
   Begin VB.TextBox Text2 
      DataField       =   "顺序号"
      DataSource      =   "Adodc1"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Index           =   2
      Left            =   3840
      TabIndex        =   5
      Top             =   3720
      Width           =   1935
   End
   Begin VB.TextBox Text2 
      DataField       =   "备注"
      DataSource      =   "Adodc1"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1815
      Index           =   5
      Left            =   7200
      MultiLine       =   -1  'True
      TabIndex        =   4
      Top             =   1800
      Width           =   1935
   End
   Begin VB.CommandButton Command2 
      Caption         =   "更改"
      Height          =   495
      Left            =   4560
      TabIndex        =   3
      Top             =   4440
      Width           =   1455
   End
   Begin VB.CommandButton Command3 
      Caption         =   "光盘信息一览"
      Height          =   495
      Left            =   6720
      TabIndex        =   2
      Top             =   4440
      Width           =   1215
   End
   Begin VB.Timer Timer1 
      Interval        =   600
      Left            =   480
      Top             =   120
   End
   Begin VB.Timer Timer2 
      Interval        =   600
      Left            =   1080
      Top             =   120
   End
   Begin VB.TextBox Text3 
      BackColor       =   &H00FFC0FF&
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   615
      Left            =   2160
      TabIndex        =   1
      Top             =   0
      Width           =   7815
   End
   Begin VB.CommandButton Command4 
      Caption         =   "返回"
      Height          =   495
      Left            =   10080
      TabIndex        =   0
      Top             =   4440
      Width           =   1095
   End
   Begin MSDataGridLib.DataGrid DataGrid1 
      Bindings        =   "Form21.frx":0000
      Height          =   1695
      Left            =   0
      TabIndex        =   8
      Top             =   5040
      Width           =   11775
      _ExtentX        =   20770
      _ExtentY        =   2990
      _Version        =   393216
      BackColor       =   16777152
      HeadLines       =   1
      RowHeight       =   16
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Caption         =   "光盘信息表GP2"
      ColumnCount     =   2
      BeginProperty Column00 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column01 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
         EndProperty
         BeginProperty Column01 
         EndProperty
      EndProperty
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   375
      Left            =   600
      Top             =   4200
      Visible         =   0   'False
      Width           =   1335
      _ExtentX        =   2355
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   3
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "DSN=disk"
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   "disk"
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from 光盘信息表GP2"
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "清输入要更改光盘的盘号"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   495
      Left            =   240
      TabIndex        =   16
      Top             =   1200
      Width           =   2175
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "请更改相关内容"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   615
      Left            =   3360
      TabIndex        =   15
      Top             =   1200
      Width           =   2175
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "盘名"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   495
      Index           =   0
      Left            =   3000
      TabIndex        =   14
      Top             =   1920
      Width           =   1215
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "套号"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   615
      Index           =   1
      Left            =   3000
      TabIndex        =   13
      Top             =   2760
      Width           =   1215
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "顺序号"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   615
      Index           =   2
      Left            =   2880
      TabIndex        =   12
      Top             =   3840
      Width           =   2055
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "备注"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   615
      Index           =   5
      Left            =   6240
      TabIndex        =   11
      Top             =   1800
      Width           =   2055
   End
End
Attribute VB_Name = "Form21"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Conn As ADODB.Connection
Private RS As ADODB.Recordset
Private Sub Command1_Click()
If Text1.Text = "" Then
MsgBox "请输入光盘盘号!"
Else
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select * from 光盘信息表GP2 where  盘号=" & Text1.Text
Adodc1.Refresh
If Adodc1.Recordset.RecordCount = 0 Then
MsgBox "你输入的光盘不存在,请再重新输入!"
Adodc1.RecordSource = "select * from 光盘信息表GP2 "
Adodc1.Refresh
Else
Adodc1.RecordSource = "select * from 光盘信息表GP2 where 盘号=" & Text1.Text
Adodc1.Refresh
Command2.Enabled = True
End If
End If
End Sub

Private Sub Command2_Click()
Dim str As String
Set RS.ActiveConnection = Conn
RS.LockType = adLockBatchOptimistic
RS.CursorType = adOpenKeyset
str = "select * from 光盘信息表GP2 where 盘号 =" & Text1.Text
RS.Open str
RS.Fields("盘名") = Text2(0).Text
RS.Fields("套号") = Text2(1).Text
RS.Fields("顺序号") = Text2(2).Text
RS.Fields("备注") = Text2(5).Text


'RS.Update
RS.Close
Adodc1.Recordset.Update
Adodc1.Refresh
Text1.Text = ""
Command2.Enabled = False
End Sub

Private Sub Form_Load()
Set Conn = New ADODB.Connection
Set RS = New Recordset
Set comm = New ADODB.Command
Conn.CursorLocation = adUseClient
Conn.Open "dsn=disk", "", ""
Command2.Enabled = False
End Sub

Private Sub Timer1_Timer()
Text3.Text = " 更改光盘信息表GP2"
End Sub

Private Sub Timer2_Timer()
Text3.Text = "            更改光盘信息表GP2 "
End Sub

⌨️ 快捷键说明

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