7,785
社区成员




Dim LoadABC1 As Boolean
Dim LoadABC2 As Boolean
Private Sub Form_Load()
'读取数据库
UserSQL.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & App.Path & "\Data\World\TaikouHero.World" & ";Persist Security Info=False"
UserSQL2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & App.Path & "\Data\World\TaikouHero.World" & ";Persist Security Info=False"
UserSQL.RecordSource = "存档一"
UserSQL2.RecordSource = "存档二"
'窗口居中
Me.Move 0, 0
'读取角色存档
L1.DataField = "角色名"
L2.DataField = "等级"
L3.DataField = "角色名"
L4.DataField = "等级"
'判断名字是否为空
If L1.Caption = "空" Then
L2.Caption = "空"
Else
Load1.Picture = LoadPicture(App.Path & "\Data\Dpc\Load_Yes1.dpc")
LoadABC1 = True
End If
If L3.Caption = "空" Then
L4.Caption = "空"
Else
Load2.Picture = LoadPicture(App.Path & "\Data\Dpc\Load_Yes1.dpc")
LoadABC2 = True
End If
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
'返回按钮鼠标离开
ReturnButton.Picture = LoadPicture(App.Path & "\Data\Dpc\Return1.dpc")
'读取图片特效开关
If LoadABC1 = True Then
Load1.Picture = LoadPicture(App.Path & "\Data\Dpc\Load_Yes1.dpc")
End If
If LoadABC2 = True Then
Load2.Picture = LoadPicture(App.Path & "\Data\Dpc\Load_Yes1.dpc")
End If
End Sub
Private Sub Load1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
'存档一鼠标按下
If LoadABC1 = True Then
LoadSE.URL = App.Path & "\Data\Sound\Yes.mp3"
LoadSE.settings.volume = 100
LoadSE.Controls.play
Else
LoadSE.URL = App.Path & "\Data\Sound\Error.mp3"
LoadSE.settings.volume = 100
LoadSE.Controls.play
End If
End Sub
Private Sub Load1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
'存档一鼠标经过
If LoadABC1 = True Then
Load1.Picture = LoadPicture(App.Path & "\Data\Dpc\Load_Yes2.dpc")
End If
End Sub
Private Sub Load2_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
'存档二鼠标按下
If LoadABC2 = True Then
LoadSE.URL = App.Path & "\Data\Sound\Yes.mp3"
LoadSE.settings.volume = 100
LoadSE.Controls.play
Else
LoadSE.URL = App.Path & "\Data\Sound\Error.mp3"
LoadSE.settings.volume = 100
LoadSE.Controls.play
End If
End Sub
Private Sub Load2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
'存档二鼠标经过
If LoadABC2 = True Then
Load2.Picture = LoadPicture(App.Path & "\Data\Dpc\Load_Yes2.dpc")
End If
End Sub
Private Sub ReturnButton_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
'返回按钮鼠标按下
If Button = 1 Then
Unload Me
End If
End Sub
Private Sub ReturnButton_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
'返回按钮经过
ReturnButton.Picture = LoadPicture(App.Path & "\Data\Dpc\Return2.dpc")
End Sub