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

📄 form4.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 Form4 
   Caption         =   "Form4"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form4"
   ScaleHeight     =   11115
   ScaleWidth      =   15240
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1 
      Caption         =   "删除记录"
      Height          =   495
      Left            =   4200
      TabIndex        =   18
      Top             =   4560
      Width           =   1095
   End
   Begin MSDataGridLib.DataGrid DataGrid1 
      Bindings        =   "Form4.frx":0000
      Height          =   3015
      Left            =   480
      TabIndex        =   17
      Top             =   5400
      Width           =   7575
      _ExtentX        =   13361
      _ExtentY        =   5318
      _Version        =   393216
      HeadLines       =   1
      RowHeight       =   15
      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            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      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          =   615
      Left            =   6840
      Top             =   4560
      Width           =   2775
      _ExtentX        =   4895
      _ExtentY        =   1085
      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=test"
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   "test"
      OtherAttributes =   ""
      UserName        =   "system"
      Password        =   "manager"
      RecordSource    =   "select hid as 分发编号 ,jid as 教材编号,hcls as 分发班级,hsl as 分发数量,hdata as 分发时间 from system.jhand"
      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.CommandButton cmdexit 
      Caption         =   "退出"
      Height          =   495
      Left            =   5520
      TabIndex        =   16
      Top             =   4560
      Width           =   1215
   End
   Begin VB.CommandButton cmdcancel 
      Caption         =   "取消"
      Height          =   495
      Left            =   3000
      TabIndex        =   15
      Top             =   4560
      Width           =   1095
   End
   Begin VB.CommandButton cmdsave 
      Caption         =   "分发"
      Height          =   495
      Left            =   1560
      TabIndex        =   14
      Top             =   4560
      Width           =   1215
   End
   Begin VB.CommandButton cmdadd 
      Caption         =   "分发请求"
      Height          =   495
      Left            =   240
      TabIndex        =   13
      Top             =   4560
      Width           =   1215
   End
   Begin VB.Frame Frame1 
      Height          =   3255
      Left            =   120
      TabIndex        =   1
      Top             =   840
      Width           =   8535
      Begin VB.TextBox Text1 
         DataSource      =   "Adodc1"
         Height          =   375
         Index           =   0
         Left            =   1200
         TabIndex        =   6
         Top             =   240
         Width           =   2295
      End
      Begin VB.TextBox Text1 
         DataSource      =   "Adodc1"
         Height          =   375
         Index           =   1
         Left            =   1200
         TabIndex        =   5
         Top             =   720
         Width           =   2295
      End
      Begin VB.TextBox Text1 
         DataSource      =   "Adodc1"
         Height          =   375
         Index           =   2
         Left            =   1200
         TabIndex        =   4
         Top             =   1320
         Width           =   2295
      End
      Begin VB.TextBox Text1 
         DataSource      =   "Adodc1"
         Height          =   375
         Index           =   3
         Left            =   1200
         TabIndex        =   3
         Top             =   1920
         Width           =   2295
      End
      Begin VB.TextBox Text1 
         DataSource      =   "Adodc1"
         Height          =   375
         Index           =   4
         Left            =   1200
         TabIndex        =   2
         Top             =   2520
         Width           =   2295
      End
      Begin VB.Label Label8 
         Caption         =   "日期格式:yyyy-mm-dd"
         Height          =   495
         Left            =   3840
         TabIndex        =   19
         Top             =   2520
         Width           =   1815
      End
      Begin VB.Label Label2 
         Caption         =   "分发编号"
         Height          =   375
         Left            =   120
         TabIndex        =   12
         Top             =   240
         Width           =   1095
      End
      Begin VB.Label Label3 
         Caption         =   "教材编号"
         Height          =   375
         Left            =   120
         TabIndex        =   11
         Top             =   840
         Width           =   975
      End
      Begin VB.Label Label4 
         Caption         =   "分发班级"
         Height          =   375
         Left            =   120
         TabIndex        =   10
         Top             =   1440
         Width           =   735
      End
      Begin VB.Label Label6 
         Caption         =   "Label6"
         Height          =   255
         Left            =   480
         TabIndex        =   9
         Top             =   2040
         Width           =   15
      End
      Begin VB.Label Label7 
         Caption         =   "分发时间"
         Height          =   375
         Left            =   120
         TabIndex        =   8
         Top             =   2640
         Width           =   735
      End
      Begin VB.Label Label5 
         Caption         =   "分发数量"
         Height          =   375
         Left            =   120
         TabIndex        =   7
         Top             =   2040
         Width           =   735
      End
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      Caption         =   "教材分发情况"
      Height          =   255
      Left            =   3120
      TabIndex        =   0
      Top             =   0
      Width           =   3015
   End
End
Attribute VB_Name = "Form4"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdadd_Click()
Adodc1.Recordset.AddNew
For i = 0 To 4
Text1(i).Enabled = True
Text1(i).Text = ""
Next i
Text1(0).SetFocus
cmdadd.Enabled = False
End Sub

Private Sub cmdcancel_Click()
For i = 0 To 4
Text1(i).Text = ""
Next i
End Sub

Private Sub cmdexit_Click()
 Dim frm As New form1
            frm.Show
End Sub

Private Sub cmdsave_Click()
Adodc1.Recordset.Fields(0) = Trim(Text1(0).Text)
Adodc1.Recordset.Fields(1) = Trim(Text1(1).Text)
Adodc1.Recordset.Fields(2) = Trim(Text1(2).Text)
Adodc1.Recordset.Fields(3) = Trim(Text1(3).Text)
Adodc1.Recordset.Fields(4) = Trim(Text1(4).Text)
Adodc1.Recordset.Update
cmdadd.Enabled = True
End Sub

Private Sub Form_Load()
Adodc1.Refresh
For i = 0 To 4
Text1(i).Enabled = False
Next i
End Sub

⌨️ 快捷键说明

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