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

📄 fenedit.frm

📁 是我应我们学校学工部做的软件,其主要是解决想我们学校这样的条件--各个办公室之间还没有建立联网,而且学校分为两个校区(又不在一个城市).   因此
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Height          =   255
         Left            =   360
         TabIndex        =   10
         Top             =   840
         Width           =   2295
      End
      Begin VB.Label Label8 
         BackStyle       =   0  'Transparent
         Caption         =   "政治面貌(&P):"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000D&
         Height          =   255
         Left            =   120
         TabIndex        =   8
         Top             =   3000
         Width           =   2295
      End
      Begin VB.Label Label7 
         BackStyle       =   0  'Transparent
         Caption         =   "性别(&S):"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000D&
         Height          =   255
         Left            =   120
         TabIndex        =   7
         Top             =   2160
         Width           =   2295
      End
      Begin VB.Label Label6 
         BackStyle       =   0  'Transparent
         Caption         =   "姓名(&N):"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000D&
         Height          =   255
         Left            =   120
         TabIndex        =   6
         Top             =   1320
         Width           =   2295
      End
      Begin VB.Label Label2 
         BackStyle       =   0  'Transparent
         Caption         =   "学号(&I):"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H8000000D&
         Height          =   255
         Left            =   120
         TabIndex        =   5
         Top             =   480
         Width           =   2295
      End
   End
   Begin VB.PictureBox Picture2 
      BorderStyle     =   0  'None
      Height          =   975
      Left            =   5880
      ScaleHeight     =   975
      ScaleWidth      =   2775
      TabIndex        =   0
      Top             =   4920
      Width           =   2775
      Begin VB.CommandButton Command1 
         Caption         =   "退    出(&Q)"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9.75
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   1440
         TabIndex        =   3
         Top             =   600
         Width           =   1335
      End
      Begin VB.CommandButton Command2 
         Caption         =   "更    新(&U)"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9.75
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   0
         TabIndex        =   2
         Top             =   120
         Width           =   1335
      End
      Begin VB.CommandButton Command4 
         Caption         =   "清除分数(&D)"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9.75
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   1440
         TabIndex        =   1
         Top             =   120
         Width           =   1335
      End
   End
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   4080
      Top             =   1680
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   1
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "fenedit.frx":3A678
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.ListView ListView1 
      Height          =   6015
      Left            =   3000
      TabIndex        =   9
      Top             =   0
      Width           =   2655
      _ExtentX        =   4683
      _ExtentY        =   10610
      View            =   3
      Arrange         =   1
      LabelEdit       =   1
      LabelWrap       =   -1  'True
      HideSelection   =   0   'False
      AllowReorder    =   -1  'True
      FullRowSelect   =   -1  'True
      GridLines       =   -1  'True
      PictureAlignment=   5
      _Version        =   393217
      Icons           =   "ImageList1"
      SmallIcons      =   "ImageList1"
      ColHdrIcons     =   "ImageList1"
      ForeColor       =   -2147483640
      BackColor       =   -2147483634
      BorderStyle     =   1
      Appearance      =   1
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      NumItems        =   3
      BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         Text            =   "学号"
         Object.Width           =   2540
      EndProperty
      BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         SubItemIndex    =   1
         Text            =   "姓名"
         Object.Width           =   2540
      EndProperty
      BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         SubItemIndex    =   2
         Text            =   "文化课分数"
         Object.Width           =   2540
      EndProperty
      Picture         =   "fenedit.frx":3A7D4
   End
End
Attribute VB_Name = "fenedit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public nn As String
Public kk As Integer
Public yy As Integer
Public wcount As Integer

Private Sub Command1_Click()
    Unload Me
End Sub

Private Sub Command2_Click()
   On Error GoTo 1
    
    Dim fen As Single
    fen = Text2.Text
    Dim temp As New ADODB.Recordset
    temp.Open " select * from [wf] where [stid]=" & Right(ListView1.SelectedItem.Key, Len(ListView1.SelectedItem.Key) - 1) & " and [ye]='" & yy & "'", main.connect, 3, 2
    If temp.RecordCount = 0 Then
        main.connect.Execute "insert into [wf]([stid],[ye],[fen]) values(" & Right(ListView1.SelectedItem.Key, Len(ListView1.SelectedItem.Key) - 1) & ",'" & yy & "'," & fen & " )"
        wcount = wcount - 1
        Label19.Caption = "还有" & wcount & "名学生未输入分数"
    Else
        temp.Fields(3) = fen
        temp.Update
    End If
    MsgBox "更新完毕", vbOKOnly Or vbInformation, "提示"
    ListView1.SelectedItem.SubItems(2) = fen
    ListView1.SetFocus
    SendKeys "{DOWN}"
    Exit Sub
1
    MsgBox "您输入的数据不合法", vbOKOnly Or vbInformation, "提示"
    Text2.SetFocus
End Sub



Private Sub Command4_Click()
    If MsgBox("您确定要删除此学生的文化课分数吗?", vbYesNo Or vbQuestion, "提示") = vbYes Then
        main.connect.Execute "Delete from [wf] where [stid]=" & Right(ListView1.SelectedItem.Key, Len(ListView1.SelectedItem.Key) - 1) & " and [ye]='" & yy & "'"
        ListView1.SelectedItem.SubItems(2) = "分数未输入"
        wcount = wcount + 1
        Label19.Caption = "还有" & wcount & "名学生未输入分数"
        Text2.Text = "分数未输入"
    End If
End Sub

Private Sub Form_Load()
    wcount = 0
    Dim itmX As ListItem
    Label17.Caption = yy & "--" & yy + 1 & "学年"
    Label3.Caption = nn
    Dim temp As New ADODB.Recordset
    Dim temp1 As New ADODB.Recordset
    temp.Open "select * from [student] where [clasid]=" & kk & " order by [stid]", main.connect, 3, 2
    Label9.Caption = "此班共有学生" & temp.RecordCount & "名"
    For i = 1 To temp.RecordCount
        Set itmX = ListView1.ListItems.Add(, "S" & temp.Fields(0), temp.Fields(3), 1, 1)
        itmX.SubItems(1) = temp.Fields(1)
        temp1.Open "select * from [wf] where [stid]=" & temp.Fields(0) & " and [ye]='" & yy & "'", main.connect, 3, 2
        If temp1.RecordCount = 0 Then
            wcount = wcount + 1
            itmX.SubItems(2) = "分数未输入"
        Else
            itmX.SubItems(2) = temp1.Fields(3)
        End If
        If i = 1 Then
            Label11.Caption = temp.Fields(3)
            Label12.Caption = temp.Fields(1)
            If temp.Fields(2) = True Then Label13 = "男" Else Label13.Caption = "女"
            If temp.Fields(4) = 0 Then
                Label14.Caption = "无"
            ElseIf temp.Fields(4) = 1 Then
                Label14.Caption = "中国共青团员"
            Else
                Label14.Caption = "中国共产党员"
            End If
            Text2.Text = itmX.SubItems(2)
        End If
        temp1.Close
        temp.MoveNext
    Next
    temp.Close
    Label19.Caption = "还有" & wcount & "名学生未输入分数"
    ListView1.Refresh
End Sub

Private Sub Form_Resize()
    On Error Resume Next
    If Me.Height < 6435 Then Me.Height = 6435
    If Me.Width < 9660 Then Me.Width = 9660
    Picture1.Height = Me.Height - 500
    Frame1.Left = Me.Width - Frame1.Width - 200
    ListView1.Height = Me.Height - 500
    Picture2.Left = Me.Width - Picture2.Width - 200
    Picture2.Top = Me.Height - Picture2.Height - 500
    ListView1.Width = Me.Width - Frame1.Width - Picture1.Width - 350
End Sub

Private Sub ListView1_ItemClick(ByVal Item As MSComctlLib.ListItem)
    nowid = Right(Item.Key, Len(Item.Key) - 1)
    Dim temp As New ADODB.Recordset
    temp.Open "select * from [student] where [ID]=" & nowid, main.connect, 3, 2
    If temp.RecordCount = 0 Then Exit Sub
        Label11.Caption = temp.Fields(3)
        Label12.Caption = temp.Fields(1)
        If temp.Fields(2) = True Then Label13 = "男" Else Label13.Caption = "女"
        If temp.Fields(4) = 0 Then
            Label14.Caption = "无"
        ElseIf temp.Fields(4) = 1 Then
            Label14.Caption = "中国共青团员"
        Else
            Label14.Caption = "中国共产党员"
        End If
        Text2.Text = ListView1.SelectedItem.SubItems(2)
        Text2.SetFocus
  
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
    If Chr(KeyAscii) = "." Then
        Exit Sub
    End If
    If KeyAscii = 8 Then Exit Sub
    If Text2.Text = "分数未输入" Then Text2.Text = ""
    If KeyAscii = 13 Then
        Command2.SetFocus
    End If
    If Chr(KeyAscii) = "." And InStr(Text2.Text, ".") <> 0 Then
        KeyAscii = 0
    End If
    If (KeyAscii < Asc("0") Or KeyAscii > Asc("9")) And KeyAscii <> Asc(".") Then
        KeyAscii = 0
    End If
End Sub

⌨️ 快捷键说明

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