永发信息网

我也在写那段代码,可以给我说一下不啊?

答案:1  悬赏:0  手机版
解决时间 2021-04-24 22:15
  • 提问者网友:龅牙恐龙妹
  • 2021-04-24 12:20

'Option Explicit

Private Sub Command1_Click()
Dim bet, wealth As Integer
Dim Num1, Num2, Num3 As Integer
Dim win As Boolean
Dim msg As String
Dim i
Dim StartTime As Single


'变量初始化
win = False
bet = Val(Text_bet.Text)
wealth = Val(Label_wealth.Caption)

'骰子滚动时的界面
Command1.Enabled = False
Label_info.Caption = "……"


'过程显示
'用循环语句动态显示骰子滚动效果(30次) Label_Num1/Label_Num1/Label_Num1
'--------------------------------Begin-------------------------------------

'以下是延迟0.1秒的代码
StartTime = Timer '记下开始的时间
While Timer < StartTime + 0.1 '循环等待(秒)
DoEvents '转让控制权,以便让操作系统处理其它的事件。
Wend


'=================================End======================================



'最后显示
'生成3个随机数 Num1/Num2/Num3
'--------------------------------Begin-------------------------------------




'=================================End================= ====================



'显示3个随机数 Label_Num1/Label_Num1/Label_Num1
'--------------------------------Begin-------------------------------------




'=================================End================= ====================



'第三部分
'判断胜负 给win 赋值
'--------------------------------Begin-------------------------------------
' option_small.value=true
' option_big.value=true



'=================================End======================================



'显示信息Label_info(恭喜你/该背时),更新资产 wealth
'--------------------------------Begin-------------------------------------
'If win Then


'else


'End If
'=================================End======================================




'“开始”按钮复原
Command1.Enabled = True
End Sub

Private Sub Form_DblClick()
'游戏重新开始
Form_Load
End Sub

Private Sub Form_Load()
'初始化
Label_wealth.Caption = 1000
Label_info.Caption = "请选择"
Label_Num1.Caption = "6"
Label_Num2.Caption = "6"
Label_Num3.Caption = "6"
Text_bet.Text = "100"
Text_bet.MaxLength = 3
End Sub

最佳答案
  • 五星知识达人网友:孤独的牧羊人
  • 2021-04-24 13:52
请问你要我给你说什么?请问清楚一点!
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯