クリックするとタイマーが開始するボタン1を作成しました。timer_tick に Label7.Text = "LOADIN G" と入力しました。Exit (Button2) も作成しました。Label7.Text = "LOADIN G" の場合、button2 の msgboxresult.no が Button1.Enabled = True になるコードを実行したいと思います。これが私がやりたいビデオです:http://www.youtube.com/watch?v=4URYhd0xA8I&feature=youtu.be
Button2 (Exit) のコードは次のとおりです。
Dim msg As String
Dim title As String
Dim style As MsgBoxStyle
Dim response As MsgBoxResult
msg = "Are you sure you want to exit?" ' Define message for exit."
style = MsgBoxStyle.DefaultButton2 Or _
MsgBoxStyle.Question Or MsgBoxStyle.YesNo
title = "Exit"
' Display message.
response = MsgBox(msg, style, title)
If response = MsgBoxResult.No Then
If Label7.Text = "L O A D I N G" Then
Button1.Enabled = True
Button5.Enabled = False
TextBox1.Enabled = True
End If
End If
If response = MsgBoxResult.Yes Then
Me.Close()
End If
私は単に行うことができます:
If response = MsgBoxResult.No Then
Button1.Enabled = True
ただし、timer1 の開始時に label7 が表示されるため、label7 についても言及することが重要です。何が起こっているのかわからないので助けてください。