📄 frmteabase.frm
字号:
Left = 4560
TabIndex = 9
Top = 480
Width = 1095
End
Begin VB.TextBox number
DataField = "编号"
DataSource = "Adodc1"
BeginProperty Font
Name = "楷体_GB2312"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1440
TabIndex = 8
Top = 480
Width = 1095
End
Begin VB.Image photo
BorderStyle = 1 'Fixed Single
Height = 2415
Left = 7560
Top = 480
Width = 2295
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "出生年月:"
BeginProperty Font
Name = "隶书"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Index = 6
Left = 240
TabIndex = 14
Top = 3000
Width = 1935
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "毕业时间和地点:"
BeginProperty Font
Name = "隶书"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Index = 9
Left = 240
TabIndex = 7
Top = 3720
Width = 1575
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "奖惩情况:"
BeginProperty Font
Name = "隶书"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Index = 8
Left = 240
TabIndex = 6
Top = 4680
Width = 1815
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "籍贯:"
BeginProperty Font
Name = "隶书"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Index = 7
Left = 240
TabIndex = 5
Top = 2160
Width = 975
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "政治面目:"
BeginProperty Font
Name = "隶书"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Index = 4
Left = 3600
TabIndex = 4
Top = 2040
Width = 1815
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "婚否:"
BeginProperty Font
Name = "隶书"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Index = 3
Left = 3600
TabIndex = 3
Top = 1320
Width = 975
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "姓名:"
BeginProperty Font
Name = "隶书"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Index = 2
Left = 3600
TabIndex = 2
Top = 480
Width = 975
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "性别:"
BeginProperty Font
Name = "隶书"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Index = 1
Left = 360
TabIndex = 1
Top = 1320
Width = 975
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "编号:"
BeginProperty Font
Name = "隶书"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Index = 0
Left = 360
TabIndex = 0
Top = 480
Width = 975
End
End
Attribute VB_Name = "frmteabase"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim photoname, sexno As String
Dim bh, bhstring As Integer
Private Sub Adodc1_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
Adodc1.Caption = "记录:" & (Adodc1.Recordset.AbsolutePosition)
If Not Adodc1.Recordset.EOF And Not Adodc1.Recordset.BOF Then
If Adodc1.Recordset!性别 = "男" Then
sex(0).Value = True
Else
sex(1).Value = True
End If
If Adodc1.Recordset!近照 <> "" Then
photo.Picture = LoadPicture(Adodc1.Recordset!近照)
Else
photo.Picture = Nothing
End If
End If
End Sub
Private Sub born_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then tandd.SetFocus
End Sub
Private Sub cmdphoto_Click()
Dim where, i As Integer
photoname = ""
Cdl.Filter = "位图文件(*.bmp)|*.bmp"
Cdl.ShowOpen
photoname = Cdl.FileName
where = 1: i = 1
While where
i = where + 1
where = InStr(i, photoname, "\")
Wend
photoname = Mid(photoname, i)
photo.Picture = LoadPicture(photoname)
End Sub
Private Sub Command1_Click(Index As Integer)
On Error Resume Next
Select Case Index
Case 0 '添加
Adodc1.Recordset.MoveLast
bhstring = Adodc1.Recordset!编号
Adodc1.Recordset.AddNew
sex(0).Value = True
merry.Value = 0
photo.Picture = Nothing
bh = Val("9" & bhstring) + 1
number.Text = Right(Str(bh), 4)
Case 1 '删除
Adodc1.Recordset.Delete adAffectCurrent
Adodc1.Refresh
Case 2 '刷新
Adodc1.Refresh
Case 3 '更新
If sex(0) Then
Adodc1.Recordset!性别 = "男"
Else
Adodc1.Recordset!性别 = "女"
End If
Adodc1.Recordset!近照 = photoname
Adodc1.Recordset.Update
Case 4 '关闭
Adodc1.Recordset.Close
Unload frmteabase
End Select
End Sub
Private Sub Form_Resize()
Frame2.Top = frmteabase.Height - Frame2.Height - 2 * Adodc1.Height
End Sub
Private Sub number_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then xm.SetFocus
End Sub
Private Sub party_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then born.SetFocus
End Sub
Private Sub tandd_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then jiang.SetFocus
End Sub
Private Sub where_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then party.SetFocus
End Sub
Private Sub xm_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then where.SetFocus
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -