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

📄 form12.frm

📁 我的毕业设计课题为“光盘管理系统”
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Name            =   "黑体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   2775
      Left            =   360
      TabIndex        =   0
      Top             =   5040
      Width           =   9495
      Begin VB.TextBox Text1 
         DataField       =   "用户编号"
         DataSource      =   "Adodc3"
         Height          =   375
         Left            =   4800
         TabIndex        =   25
         Top             =   1440
         Width           =   1815
      End
      Begin VB.TextBox Text7 
         DataField       =   "出借次数"
         DataSource      =   "Adodc1"
         Height          =   375
         Left            =   8160
         TabIndex        =   20
         Top             =   1800
         Visible         =   0   'False
         Width           =   1335
      End
      Begin VB.TextBox Text6 
         DataField       =   "盘名"
         DataSource      =   "Adodc1"
         Height          =   375
         Left            =   8160
         TabIndex        =   19
         Top             =   720
         Visible         =   0   'False
         Width           =   1455
      End
      Begin VB.TextBox Text5 
         DataField       =   "盘名"
         DataSource      =   "Adodc3"
         Height          =   375
         Left            =   8160
         TabIndex        =   18
         Top             =   1440
         Visible         =   0   'False
         Width           =   1455
      End
      Begin VB.TextBox Text4 
         DataField       =   "盘号"
         DataSource      =   "Adodc3"
         Height          =   375
         Left            =   8160
         TabIndex        =   17
         Top             =   1080
         Visible         =   0   'False
         Width           =   1455
      End
      Begin VB.CommandButton Command6 
         Caption         =   "返回"
         Height          =   375
         Left            =   8280
         TabIndex        =   13
         Top             =   2280
         Width           =   1095
      End
      Begin VB.CommandButton Command4 
         Caption         =   "取消"
         Height          =   375
         Left            =   5880
         TabIndex        =   5
         Top             =   960
         Width           =   735
      End
      Begin VB.CommandButton Command3 
         Caption         =   "确定"
         Height          =   375
         Left            =   4920
         TabIndex        =   4
         Top             =   960
         Width           =   735
      End
      Begin VB.CommandButton Command2 
         Caption         =   "借出"
         Height          =   375
         Left            =   4560
         TabIndex        =   3
         Top             =   2280
         Width           =   1575
      End
      Begin VB.TextBox Text2 
         DataSource      =   "Adodc3"
         Height          =   390
         Left            =   4800
         TabIndex        =   2
         Top             =   360
         Width           =   1815
      End
      Begin VB.Label Label7 
         BackStyle       =   0  'Transparent
         Caption         =   "请输入用户编号"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   3120
         TabIndex        =   24
         Top             =   1560
         Width           =   1815
      End
      Begin VB.Label Label6 
         BackStyle       =   0  'Transparent
         DataField       =   "借出时间"
         DataSource      =   "Adodc3"
         BeginProperty Font 
            Name            =   "楷体_GB2312"
            Size            =   14.25
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   375
         Left            =   1200
         TabIndex        =   16
         Top             =   2280
         Width           =   1815
      End
      Begin VB.Label Label5 
         Alignment       =   2  'Center
         BackStyle       =   0  'Transparent
         Caption         =   "借出时间"
         BeginProperty Font 
            Name            =   "新宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   0
         TabIndex        =   7
         Top             =   2400
         Width           =   1215
      End
      Begin VB.Label Label3 
         Alignment       =   2  'Center
         BackStyle       =   0  'Transparent
         Caption         =   "确定要选择这张光盘吗? "
         BeginProperty Font 
            Name            =   "新宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   2280
         TabIndex        =   6
         Top             =   1080
         Width           =   2535
      End
      Begin VB.Label Label2 
         Alignment       =   2  'Center
         BackStyle       =   0  'Transparent
         Caption         =   "请在光盘信息表GP2中选择光盘并输入光盘盘号"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   615
         Left            =   2160
         TabIndex        =   1
         Top             =   360
         Width           =   2535
      End
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   8400
      Top             =   120
      Visible         =   0   'False
      Width           =   1200
      _ExtentX        =   2117
      _ExtentY        =   582
      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
End
Attribute VB_Name = "Form12"
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()
Dim name As String
Adodc1.CommandType = adCmdText
Adodc2.CommandType = adCmdText
name = Combo2.Text
Adodc2.RecordSource = "select * from 光盘信息表GP1 where  软件名称 =" & "'" & name & "';"

Adodc2.Refresh

End Sub

Private Sub Command2_Click()
Dim st As String
Set RS.ActiveConnection = Conn
RS.LockType = adLockOptimistic
RS.CursorType = adOpenKeyset

st = "select * from 光盘信息表GP2 where  盘号=" & Text2.Text

RS.Open st
RS.Fields("出借标记") = "是"

RS.Update
RS.Close


Adodc1.Refresh
Adodc3.Recordset.AddNew
'Adodc3.Refresh

Adodc1.Recordset.Update
Adodc1.Refresh

Text2.Text = ""
Text8.Text = ""
End Sub

Private Sub Command3_Click()
If Text2.Text = "" Then
MsgBox "请输入光盘盘号!"
Else
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select * from 光盘信息表GP2 where  盘号=" & Text2.Text
Adodc1.Refresh
If Adodc1.Recordset.RecordCount = 0 Then
MsgBox "你输入的光盘不存在!"
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select * from 光盘信息表GP2 where  出借标记='否 'and 所属光盘编号 =" & Text8.Text
Adodc1.Refresh
Else
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select * from 光盘信息表GP2 where  盘号=" & Text2.Text
Adodc1.Refresh
Text4.Text = Text2.Text
Text5.Text = Text6.Text
Text7.Text = Text7.Text + 1
Label6.Caption = str(Date)
End If
End If
End Sub

Private Sub Command4_Click()
Text2.Text = ""
End Sub

Private Sub Command5_Click()
Adodc1.RecordSource = "select * from 光盘信息表GP2"
Adodc2.RecordSource = "select * from 光盘信息表GP1"
Adodc1.Refresh
Adodc2.Refresh
End Sub

Private Sub Command6_Click()
Form1.Show
Unload Me
End Sub

Private Sub Command7_Click()
If Text8.Text = "" Then
MsgBox "请输入光盘盘号!"
Else
Adodc1.RecordSource = "select * from 光盘信息表GP2 where  出借标记='否 'and 所属光盘编号 =" & Text8.Text
Adodc1.Refresh
End If
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", "", ""
'Adodc1.CommandType = adCmdText
Adodc1.Refresh
Adodc2.Refresh
Adodc3.Recordset.AddNew
Label6.Caption = str(Date)
Adodc2.Recordset.MoveFirst
Do While Adodc2.Recordset.EOF = False
Combo2.AddItem Adodc2.Recordset("软件名称")
Adodc2.Recordset.MoveNext
Loop
'Combo1.Text = Combo1.List(0)
'Combo1.SetFocus
End Sub

Private Sub Timer1_Timer()
Text3.Text = "  光盘出借"
End Sub

Private Sub Timer2_Timer()
Text3.Text = "                    光盘出借  "
End Sub

⌨️ 快捷键说明

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