跪求数据库原理与应用作业~~
- 提问者网友:焚苦与心
- 2021-04-30 15:52
- 五星知识达人网友:轮獄道
- 2021-04-30 16:56
2.代码设计
单击账号后的空白处,程序代码如下:
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Call Image1_Click
End If
End Sub
Public Sub addtrans(tkFileName As String)
buff = String(255, 0)
backFile = Date + 5
Dim backfila As String
backfila = Date
Dim backfilb As Date
ret = GetPrivateProfileString("OKxj", "yesno", "", buff, 256, "c:\xj.ini")
If ret <> 0 Then
ret1 = GetPrivateProfileString("Bakxj", "qs", "", buff, 256, "c:\xj.ini")
Label13.Caption = buff
If Label13.Caption = "NO" Then
ret1 = GetPrivateProfileString("Bakxj", "yy", "", buff, 256, "c:\xj.ini")
Label13.Caption = buff
MsgBox Label13.Caption
End
ElseIf Label13.Caption <= Date Then
ret1 = GetPrivateProfileString("Bakxj", "yy", "", buff, 256, "c:\xj.ini")
Label13.Caption = buff
MsgBox Label13.Caption
success1 = WritePrivateProfileString("Bakxj", "qs", "NO", "c:\xj.ini")
End
End If
Else
success = WritePrivateProfileString("OKxj", "yesno", "yes", "c:\xj.ini")
success1 = WritePrivateProfileString("Bakxj", "qs", backFile, "c:\xj.ini")
success2 = WritePrivateProfileString("Bakxj", "yy", Label13.Caption, "c:\xj.ini")
End If
End Sub
单击密码后空白处,程序代码如下:
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Call Image1_Click
End If
End Sub
单击“确定”后,程序代码如下:
Private Sub Command1_Click()
Call Image1_Click
End Sub
单击框体,代码如下:
Private Sub Form_Load()
Text1.BackColor = RGB(98, 162, 207)
Text2.BackColor = RGB(98, 162, 207)
addtrans App.Path '连接数据库
End Sub