2009年2月17日 星期二

拉霸遊戲-部份完成版

image

Public Class Form1
    Dim acc
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        acc = 1000
        Label4.Text = "$" & acc
        Label1.Text = 1
        Label2.Text = 2
        Label3.Text = 3
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Label1.Text = Int(Rnd() * 10)
        Label2.Text = Int(Rnd() * 10)
        Label3.Text = Int(Rnd() * 10)
        acc = acc - 50
        Label4.Text = "$" & acc
    End Sub
End Class

沒有留言:

張貼留言