拉霸程式


使用控制項及設定

物件 屬性 設定
表單(Form) Text Bingo
標籤方塊(Label) x 3 Text 7,7,7
按鈕(Button) Text 0
計時器(Timer) x 2 Interval 0

界面設計

參考程式

Public Class Form1

 

Dim TotalHit as integer

 

          Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

intTotalHit += 1        'TotalHint =TotalHit + 1

Button1.Text = TotalHit

Timer1.Interval = 10

Timer1.Enabled = True

Randomize()

Timer2.Interval = 100

Timer2.Enabled = True

 

End Sub

 

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

Randomize()

Label1.Text = Fix(Rnd() * 10)

Label2.Text = Fix(Rnd() * 10)

Label3.Text = Fix(Rnd() * 10)

         End Sub

        

        Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick

Timer1.Enabled = False

Timer2.Enabled = False

'這理可給音響曾加趣味!

'這裡查檢查是否=777, 若是給中獎訊息!

 

        End Sub

 

End Class

 

 

 

 

 

 

 

 

 

 

出現777時,拉霸最少者,有個!!!

 

當777出現時,播放聲音之寫法

My.Computer.Audio.Play("聲音檔路徑與檔名")     '在系統中找到wav檔播放, 例如complete.wav