www.pudn.com > vbgame.rar > Form1.frm


VERSION 5.00 
Begin VB.Form Form1  
   BorderStyle     =   1  'Fixed Single 
   Caption         =   "超级堵王游戏2.0" 
   ClientHeight    =   4080 
   ClientLeft      =   3105 
   ClientTop       =   2610 
   ClientWidth     =   5415 
   Icon            =   "Form1.frx":0000 
   LinkTopic       =   "Form1" 
   MaxButton       =   0   'False 
   MinButton       =   0   'False 
   ScaleHeight     =   4080 
   ScaleWidth      =   5415 
   Begin VB.Frame Frame1  
      Caption         =   "选择 买大买小" 
      Height          =   2175 
      Left            =   720 
      TabIndex        =   4 
      Top             =   1080 
      Width           =   2175 
      Begin VB.OptionButton Option2  
         Caption         =   "买小" 
         Height          =   495 
         Left            =   480 
         TabIndex        =   7 
         Top             =   1440 
         Width           =   1215 
      End 
      Begin VB.OptionButton Option1  
         Caption         =   "买大" 
         Height          =   495 
         Left            =   480 
         TabIndex        =   6 
         Top             =   480 
         Value           =   -1  'True 
         Width           =   1335 
      End 
   End 
   Begin VB.TextBox Text1  
      Height          =   320 
      Left            =   3720 
      TabIndex        =   3 
      Text            =   "100" 
      Top             =   2760 
      Width           =   1335 
   End 
   Begin VB.Timer Timer2  
      Enabled         =   0   'False 
      Interval        =   300 
      Left            =   4560 
      Top             =   120 
   End 
   Begin VB.CommandButton Command1  
      Caption         =   "开始" 
      Default         =   -1  'True 
      Height          =   495 
      Left            =   600 
      TabIndex        =   1 
      ToolTipText     =   "单击开始游戏" 
      Top             =   3480 
      Width           =   1215 
   End 
   Begin VB.CommandButton Command2  
      Caption         =   "退出" 
      Height          =   495 
      Left            =   3600 
      TabIndex        =   2 
      Top             =   3480 
      Width           =   1215 
   End 
   Begin VB.Timer Timer1  
      Enabled         =   0   'False 
      Interval        =   50 
      Left            =   240 
      Top             =   0 
   End 
   Begin VB.Label Label4  
      AutoSize        =   -1  'True 
      Caption         =   "你的资金:" 
      Height          =   180 
      Left            =   3360 
      TabIndex        =   9 
      Top             =   1080 
      Width           =   900 
   End 
   Begin VB.Label Label3  
      AutoSize        =   -1  'True 
      Caption         =   "请输入你的赌注" 
      Height          =   180 
      Left            =   3120 
      TabIndex        =   8 
      Top             =   2520 
      Width           =   1260 
   End 
   Begin VB.Label Label2  
      Caption         =   "6000" 
      Height          =   255 
      Left            =   4320 
      TabIndex        =   5 
      Top             =   1080 
      Width           =   975 
   End 
   Begin VB.Label Label1  
      Caption         =   "大\小" 
      BeginProperty Font  
         Name            =   "宋体" 
         Size            =   26.25 
         Charset         =   134 
         Weight          =   400 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      ForeColor       =   &H00C000C0& 
      Height          =   615 
      Left            =   2040 
      TabIndex        =   0 
      Top             =   240 
      Width           =   1575 
   End 
   Begin VB.Menu youxi  
      Caption         =   "游戏" 
      WindowList      =   -1  'True 
      Begin VB.Menu chongxi  
         Caption         =   "重新游戏" 
      End 
      Begin VB.Menu f  
         Caption         =   "-" 
      End 
      Begin VB.Menu xuanxiang  
         Caption         =   "定义背景颜色..." 
      End 
   End 
   Begin VB.Menu chakan  
      Caption         =   "查看" 
      Begin VB.Menu yongx  
         Caption         =   "英雄排行榜..." 
      End 
   End 
   Begin VB.Menu help  
      Caption         =   "帮助" 
      Begin VB.Menu guanyu  
         Caption         =   "关于..." 
      End 
      Begin VB.Menu hep  
         Caption         =   "帮助..." 
      End 
   End 
End 
Attribute VB_Name = "Form1" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
Dim n, b 
 
 
 
Private Sub chongxi_Click() 
Label2.Caption = 6000 
Text1.Text = 100 
Option1.Value = True 
Label1.Caption = "大\小" 
End Sub 
 
Private Sub Command1_Click() 
If CInt(Text1.Text) > CInt(Label2.Caption) Then 
MsgBox "对不起,你的资金不足!", 16, "资金不足" 
Else 
Command1.Enabled = False 
Timer2.Enabled = True 
n = 50 
End If 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
End Sub 
 
Private Sub Command2_Click() 
Dim gg 
 
If 6000 < CInt(Label2.Caption) Then 
'Form2.Show 
gg = MsgBox("赢了就想走是吗?", 64 + 4, "提示") 
If gg = 6 Then 
End 
End If 
Else 
    If 6000 > CInt(Label2.Caption) Then 
    gg = MsgBox("输了就想走是吗?", 64 + 4, "提示") 
    If gg = 6 Then 
    End 
    End If 
    'Form3.Show 
    Else 
    gg = MsgBox("游戏不好玩吗,你要走吗?", 64 + 4, "提示") 
    If gg = 6 Then 
    End 
    End If 
    'Form4.Show 
    End If 
End If 
 
 
End Sub 
 
Private Sub exp_Click() 
'frmBrowser.Show 
 
End Sub 
 
Private Sub Form_Load() 
n = 50 
b = 1 
 
End Sub 
 
Private Sub guanyu_Click() 
frmAbout.Show 
End Sub 
 
Private Sub hep_Click() 
frmhelp.Show 
End Sub 
 
Private Sub Option1_Click() 
b = 1 
End Sub 
 
 
Private Sub Option2_Click() 
b = 2 
End Sub 
 
 
Private Sub Timer1_Timer() 
If Label1.Caption = "大" Then 
Label1.Caption = "小" 
Else 
Label1.Caption = "大" 
End If 
 
 
End Sub 
 
Private Sub Timer2_Timer() 
Timer1.Interval = n 
Timer1.Enabled = True 
 
n = n + 50 
If n > 1000 Then 
Command1.Enabled = True 
Timer1.Enabled = False 
 
    Dim i 
    i = Int(2 * Rnd + 1) 
 
   If i = 1 Then 
   Label1.Caption = "大" 
   Else 
   Label1.Caption = "小" 
   End If 
  
   If i = b Then 
  MsgBox "恭喜你,你赢了!", 64, "恭喜!" 
  Label2.Caption = CInt(Text1.Text) + CInt(Label2.Caption) 
  If CInt(Label2.Caption) > 10000 Then 
  Form6.Show 
  End If 
   
   Else 
  MsgBox "倒霉,你输了!", 16, "倒霉!" 
  Label2.Caption = Label2.Caption - Text1.Text 
  End If 
  Timer2.Enabled = False 
  End If 
   
   
 
End Sub 
 
 
Private Sub xuanxiang_Click() 
frmopin.Show 
End Sub 
 
Private Sub yongx_Click() 
Form5.Show 
End Sub