⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 5.1.frm

📁 VB6.0应用例题
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   BackColor       =   &H00C0C0C0&
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "彩票开奖器"
   ClientHeight    =   2700
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   5055
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2700
   ScaleWidth      =   5055
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  '窗口缺省
   Begin VB.Frame Frame1 
      Caption         =   "中奖号码"
      Height          =   1335
      Left            =   240
      TabIndex        =   6
      Top             =   360
      Width           =   3255
      Begin VB.Label Label1 
         Alignment       =   2  'Center
         BackColor       =   &H00FFFFC0&
         ForeColor       =   &H0080FFFF&
         Height          =   735
         Index           =   0
         Left            =   240
         TabIndex        =   10
         Top             =   360
         Width           =   495
      End
      Begin VB.Label Label1 
         Alignment       =   2  'Center
         BackColor       =   &H00FFFFC0&
         ForeColor       =   &H0080FFFF&
         Height          =   735
         Index           =   1
         Left            =   960
         TabIndex        =   9
         Top             =   360
         Width           =   495
      End
      Begin VB.Label Label1 
         Alignment       =   2  'Center
         BackColor       =   &H00FFFFC0&
         ForeColor       =   &H0080FFFF&
         Height          =   735
         Index           =   2
         Left            =   1680
         TabIndex        =   8
         Top             =   360
         Width           =   495
      End
      Begin VB.Label Label1 
         Alignment       =   2  'Center
         BackColor       =   &H00FFFFC0&
         ForeColor       =   &H0080FFFF&
         Height          =   735
         Index           =   3
         Left            =   2400
         TabIndex        =   7
         Top             =   360
         Width           =   495
      End
   End
   Begin VB.CommandButton Cmd_Redo 
      Caption         =   "ReDO(&D)"
      Height          =   495
      Left            =   3720
      TabIndex        =   5
      Top             =   480
      Width           =   1095
   End
   Begin VB.CommandButton Cmd_Exit 
      Caption         =   "Exit(&X)"
      Height          =   495
      Left            =   3720
      TabIndex        =   4
      Top             =   1200
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "No.4"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Index           =   3
      Left            =   2520
      TabIndex        =   3
      Top             =   1800
      Width           =   735
   End
   Begin VB.CommandButton Command1 
      Caption         =   "No.3"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Index           =   2
      Left            =   1800
      TabIndex        =   2
      Top             =   1800
      Width           =   735
   End
   Begin VB.CommandButton Command1 
      Caption         =   "No.2"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Index           =   1
      Left            =   1080
      TabIndex        =   1
      Top             =   1800
      Width           =   735
   End
   Begin VB.CommandButton Command1 
      Caption         =   "No.1"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Index           =   0
      Left            =   360
      MousePointer    =   1  'Arrow
      TabIndex        =   0
      Top             =   1800
      Width           =   735
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click(Index As Integer) '开奖
    Command1(Index).Enabled = False          '使点击过的按钮不可用
    Randomize (Time)
    Label1(Index).Caption = Int(Rnd * 10)    '对应的标签上显示0-9随机数
    Label1(Index).FontSize = "24"
    Label1(Index).ForeColor = RGB(255, 0, 0)
End Sub
Private Sub Cmd_Redo_Click()
   For i = 0 To 3
      Command1(i).Enabled = True
      Label1(i).Caption = ""
   Next i
End Sub
Private Sub Cmd_Exit_Click()
  End
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -