Board logo

標題: 電腦問題(錯區。。求版主幫手轉區) [打印本頁]

作者: 梁一鳴    時間: 2010-5-19 11:22     標題: 電腦問題(錯區。。求版主幫手轉區)

Dim num_1, num_2, num_3 As Integer
Dim total As Integer
Dim bingo As Integer
Private Sub form_load()
total = 0
bingo = 0
End Sub
Private Sub PRESS_BTM_Click()
  Randomize
    total = total + 1
    num_1 = Int(Rnd * 6) + 1
    num_2 = Int(Rnd * 6) + 1
    num_3 = Int(Rnd * 6) + 1
   
    If num_1 = 1 Then Image1.Picture = Image_pic1.Picture
    If num_1 = 2 Then Image1.Picture = Image_pic2.Picture
    If num_1 = 3 Then Image1.Picture = Image_pic3.Picture
    If num_1 = 4 Then Image1.Picture = Image_pic4.Picture
    If num_1 = 5 Then Image1.Picture = Image_pic5.Picture
    If num_1 = 6 Then Image1.Picture = Image_pic6.Picture
   
    If num_2 = 1 Then Image2.Picture = Image_pic1.Picture
    If num_2 = 2 Then Image2.Picture = Image_pic2.Picture
    If num_2 = 3 Then Image2.Picture = Image_pic3.Picture
    If num_2 = 4 Then Image2.Picture = Image_pic4.Picture
    If num_2 = 5 Then Image2.Picture = Image_pic5.Picture
    If num_2 = 6 Then Image2.Picture = Image_pic6.Picture
     
    If num_3 = 1 Then Image3.Picture = Image_pic1.Picture
    If num_3 = 2 Then Image3.Picture = Image_pic2.Picture
    If num_3 = 3 Then Image3.Picture = Image_pic3.Picture
    If num_3 = 4 Then Image3.Picture = Image_pic4.Picture
    If num_3 = 5 Then Image3.Picture = Image_pic5.Picture
    If num_3 = 6 Then Image3.Picture = Image_pic6.Picture
   
    If (num_1 = num_2) And (num_1 = num_3) Then
      bingo = bingo + 1
      MsgBox "bingo!you are winning " & bingo & " out of " & total & "times", , "winning"
    End If
End Sub

[ 本帖最後由 梁一鳴 於 2010-5-19 20:40 編輯 ]
作者: ME]AnDy    時間: 2010-5-19 11:31

visual basic 黎?_?....
作者: aa9999    時間: 2010-5-19 11:51

你想問咩先  自己放落VB  F5 test 先
作者: 梁一鳴    時間: 2010-5-19 20:38

回復 2# 的帖子



回復 3# 的帖子
我想問..
點解我照左E個打法,個接扭比我禁左之後無反應既
作者: 我要殺人    時間: 2010-5-19 20:50

引用:
原帖由 ME]AnDy 於 2010-5-19 11:31 發表
visual basic 黎?_?....
果然厲害,我以為亂打TIM




歡迎光臨 IPvE vLan 遊戲平台|網吧系統 (https://www.ipve.com/bbs/) Powered by Discuz! 6.0.0