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

📄 main_magazine.frm

📁 vb 用于做数据库的 关于稿费的发放的系统 vb 用于做数据库的 关于稿费的发放的系统
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form Main_Magazine 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "刊物信息管理"
   ClientHeight    =   6075
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   8235
   Icon            =   "Main_Magazine.frx":0000
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Picture         =   "Main_Magazine.frx":000C
   ScaleHeight     =   6075
   ScaleWidth      =   8235
   StartUpPosition =   1  '所有者中心
   Begin MSAdodcLib.Adodc Adodc2 
      Height          =   330
      Left            =   135
      Top             =   2670
      Visible         =   0   'False
      Width           =   2100
      _ExtentX        =   3704
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   1
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=GFGL"
      OLEDBString     =   "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=GFGL"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from 刊物信息表"
      Caption         =   "Adodc2"
      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 MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   135
      Top             =   2235
      Visible         =   0   'False
      Width           =   2100
      _ExtentX        =   3704
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   1
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=GFGL"
      OLEDBString     =   "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=GFGL"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from 刊物信息表"
      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.TextBox TxtM 
      BackColor       =   &H00FFFFFF&
      DataField       =   "创建日期"
      DataSource      =   "Adodc1"
      Enabled         =   0   'False
      Height          =   375
      Index           =   5
      Left            =   4455
      TabIndex        =   13
      Top             =   4155
      Width           =   3315
   End
   Begin VB.TextBox TxtM 
      BackColor       =   &H00FFFFFF&
      DataField       =   "备注"
      DataSource      =   "Adodc1"
      Enabled         =   0   'False
      Height          =   375
      Index           =   6
      Left            =   4455
      TabIndex        =   12
      Top             =   4710
      Width           =   3315
   End
   Begin VB.CommandButton CmdSave 
      BackColor       =   &H008080FF&
      Height          =   390
      Left            =   4275
      Picture         =   "Main_Magazine.frx":A22C0
      Style           =   1  'Graphical
      TabIndex        =   11
      Top             =   5370
      Width           =   1140
   End
   Begin VB.CommandButton CmdCancel 
      BackColor       =   &H00C0C0FF&
      Height          =   390
      Left            =   5775
      Picture         =   "Main_Magazine.frx":A3D98
      Style           =   1  'Graphical
      TabIndex        =   10
      Top             =   5370
      Width           =   1140
   End
   Begin VB.TextBox TxtM 
      BackColor       =   &H00FFFFFF&
      DataField       =   "刊物名称"
      DataSource      =   "Adodc1"
      Enabled         =   0   'False
      Height          =   375
      Index           =   0
      Left            =   4455
      TabIndex        =   9
      Top             =   1290
      Width           =   3315
   End
   Begin VB.TextBox TxtM 
      BackColor       =   &H00FFFFFF&
      DataField       =   "刊物代码"
      DataSource      =   "Adodc1"
      Enabled         =   0   'False
      Height          =   375
      Index           =   1
      Left            =   4455
      TabIndex        =   8
      Top             =   1845
      Width           =   3315
   End
   Begin VB.TextBox TxtM 
      BackColor       =   &H00FFFFFF&
      DataField       =   "所属部门"
      DataSource      =   "Adodc1"
      Enabled         =   0   'False
      Height          =   375
      Index           =   2
      Left            =   4455
      TabIndex        =   7
      Top             =   2415
      Width           =   3315
   End
   Begin VB.TextBox TxtM 
      BackColor       =   &H00FFFFFF&
      DataField       =   "刊物类型"
      DataSource      =   "Adodc1"
      Enabled         =   0   'False
      Height          =   375
      Index           =   3
      Left            =   4455
      TabIndex        =   6
      Top             =   3015
      Width           =   3315
   End
   Begin VB.TextBox TxtM 
      BackColor       =   &H00FFFFFF&
      DataField       =   "负责人"
      DataSource      =   "Adodc1"
      Enabled         =   0   'False
      Height          =   375
      Index           =   4
      Left            =   4455
      TabIndex        =   5
      Top             =   3585
      Width           =   3315
   End
   Begin MSDataListLib.DataList DataList1 
      Bindings        =   "Main_Magazine.frx":A5870
      Height          =   4680
      Left            =   240
      TabIndex        =   3
      Top             =   1140
      Width           =   2445
      _ExtentX        =   4313
      _ExtentY        =   8255
      _Version        =   393216
      ListField       =   "刊物名称"
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "刊物名称:         刊物编号:         所属部门:           刊物类型:         负责人  :           创建日期:           备  注  :"
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   4005
      Left            =   3180
      TabIndex        =   4
      Top             =   1350
      Width           =   1365
   End
   Begin VB.Label LblEnd 
      Alignment       =   2  'Center
      BackColor       =   &H000080FF&
      BackStyle       =   0  'Transparent
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   15
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000C000&
      Height          =   375
      Left            =   6390
      TabIndex        =   2
      Top             =   600
      Width           =   1725
   End
   Begin VB.Label LblModify 
      Alignment       =   2  'Center
      BackColor       =   &H000080FF&
      BackStyle       =   0  'Transparent
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   15
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000C000&
      Height          =   375
      Left            =   4770
      TabIndex        =   1
      Top             =   615
      Width           =   1725
   End
   Begin VB.Label LblAdd 
      Alignment       =   2  'Center
      BackColor       =   &H000080FF&
      BackStyle       =   0  'Transparent
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   15
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000C000&
      Height          =   375
      Left            =   2985
      TabIndex        =   0
      Top             =   600
      Width           =   1725
   End
End
Attribute VB_Name = "Main_Magazine"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub CmdCancel_Click()
  For i = 0 To 6
      TxtM(i).Text = ""
  Next i
End Sub

Private Sub CmdSave_Click()
  If TxtM(0).Text = "" Then
    MsgBox "刊物名称不允许为空!"
    Exit Sub
  End If
  If TxtM(1).Text = "" Then
    MsgBox "刊物编号不允许为空!"
    Exit Sub
  End If
  If TxtM(2).Text = "" Then
    MsgBox "刊物类型不允许为空!"
    Exit Sub
  End If
  Adodc1.Recordset.Update     '更新记录
  Adodc2.Refresh
  '设置控件不可用
  For i = 0 To 6
      TxtM(i).Enabled = False
  Next i
  LblAdd.Caption = ""
  LblModify.Caption = ""
End Sub
Private Sub DataList1_Click()
  Adodc1.RecordSource = "select * from 刊物信息表 where 刊物名称='" + DataList1.Text + "'"
  Adodc1.Refresh
End Sub
Private Sub LblAdd_Click()
  LblAdd.Caption = "新增刊物"
  LblModify.Caption = ""
  Adodc1.Recordset.AddNew
  For i = 0 To 6
      TxtM(i).Enabled = True
      TxtM(i).Text = ""
  Next i
  TxtM(0).SetFocus
End Sub
Private Sub LblModify_Click()
  LblAdd.Caption = ""
  LblModify.Caption = "刊物修改"
  For i = 0 To 6
   TxtM(i).Enabled = True
  Next i
  TxtM(0).SetFocus
End Sub
Private Sub TxtM_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
  If KeyCode = vbKeyReturn And Index < 6 Then TxtM(Index + 1).SetFocus
  If KeyCode = vbKeyReturn And Index = 6 Then

    CmdSave.SetFocus
  End If
End Sub
Private Sub LblEnd_Click()
  Frm_Main.Show
  Unload Me
End Sub
Private Sub TxtM_LostFocus(Index As Integer)
  If Index = 5 Then
    If Not IsDate(TxtM(5)) Then
      MsgBox "请输入日期型数据!"
      TxtM(5).SetFocus
      Exit Sub
    End If
  End If
End Sub

⌨️ 快捷键说明

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