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

📄 frmschoolinfo.frm

📁 学生管理系统,vb+acc开发的一个简单程序
💻 FRM
字号:
VERSION 5.00
Object = "{CE671F01-259E-40DA-92FE-95803E2ECBB5}#1.0#0"; "SmartXPButton.ocx"
Begin VB.Form FrmSchoolInfo 
   BackColor       =   &H00E7DFE7&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "学校信息设置"
   ClientHeight    =   2340
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4680
   Icon            =   "FrmSchoolInfo.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   2340
   ScaleWidth      =   4680
   Begin VB.TextBox txtSchoolTel 
      Height          =   375
      Left            =   1320
      MaxLength       =   12
      TabIndex        =   1
      Top             =   960
      Width           =   3135
   End
   Begin VB.TextBox txtSchoolName 
      Height          =   375
      Left            =   1320
      MaxLength       =   12
      TabIndex        =   0
      Top             =   240
      Width           =   3135
   End
   Begin SmartXPButton.XpButton cmdSave 
      Height          =   495
      Left            =   720
      TabIndex        =   2
      Top             =   1680
      Width           =   1335
      _ExtentX        =   2355
      _ExtentY        =   873
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Caption         =   "保存(&S)"
      CaptionMouseOverColor=   16711680
      PictureBackColor=   15790320
      PictureSmoothBackColor=   15790320
      ButtonPicture   =   "FrmSchoolInfo.frx":1CFA
   End
   Begin SmartXPButton.XpButton cmdExit 
      Cancel          =   -1  'True
      Height          =   495
      Left            =   2520
      TabIndex        =   3
      Top             =   1680
      Width           =   1335
      _ExtentX        =   2355
      _ExtentY        =   873
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Caption         =   "关闭(&E)"
      CaptionMouseOverColor=   16711680
      PictureBackColor=   15790320
      PictureSmoothBackColor=   15790320
      ButtonPicture   =   "FrmSchoolInfo.frx":2334
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "学校电话:"
      Height          =   180
      Left            =   240
      TabIndex        =   5
      Top             =   1080
      Width           =   900
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "学校简称:"
      Height          =   180
      Left            =   240
      TabIndex        =   4
      Top             =   360
      Width           =   900
   End
End
Attribute VB_Name = "FrmSchoolInfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Myschoolinfo As OpenRs
Private Sub cmdExit_Click()
Unload Me
End Sub

Private Sub Cmdsave_Click()
If txtSchoolName.Text = "" Then
   txtSchoolName.SetFocus
   MsgBox "请输入学校简称!", vbOKOnly + vbInformation, "学校信息设置"
   Exit Sub
End If
If txtSchoolTel.Text = "" Then
   txtSchoolTel.SetFocus
   MsgBox "请输入学校电话!", vbOKOnly + vbInformation, "学校信息设置"
   Exit Sub
End If

Myschoolinfo.rsDK1 "select * from school_info"
If Myschoolinfo.rs1.EOF Then
   Myschoolinfo.rs1.AddNew
   Myschoolinfo.rs1!school_name = txtSchoolName.Text
   Myschoolinfo.rs1!school_tel = txtSchoolTel.Text
   Myschoolinfo.rs1.Update
   MsgBox "学校信息已保存!", vbOKOnly + vbInformation, "学校信息设置"
Else
   Myschoolinfo.rs1!school_name = txtSchoolName.Text
   Myschoolinfo.rs1!school_tel = txtSchoolTel.Text
   Myschoolinfo.rs1.Update
   MsgBox "学校信息已更新!", vbOKOnly + vbInformation, "学校信息设置"
End If
End Sub

Private Sub Form_Load()
Set Myschoolinfo = New OpenRs
Myschoolinfo.rsDK1 "select * from school_info"
If Myschoolinfo.rs1.EOF = False Then
txtSchoolName.Text = Myschoolinfo.rs1!school_name
txtSchoolTel.Text = Myschoolinfo.rs1!school_tel
End If
End Sub

Private Sub txtSchoolName_KeyPress(KeyAscii As Integer)
If KeyAscii = 39 Then KeyAscii = 0
End Sub

Private Sub txtSchoolTel_KeyPress(KeyAscii As Integer)
If Not (Chr(KeyAscii) <= "9" And Chr(KeyAscii) >= "0" Or KeyAscii = 45 Or KeyAscii = 8) Then
    KeyAscii = 0
End If
End Sub

⌨️ 快捷键说明

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