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

📄 caidan.frm

📁 有时对于要吃什么菜
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   4005
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   8535
   LinkTopic       =   "Form1"
   ScaleHeight     =   11490
   ScaleWidth      =   19080
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command2 
      Caption         =   "Command2"
      Height          =   615
      Left            =   0
      TabIndex        =   1
      Top             =   1680
      Width           =   735
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Command1"
      Height          =   495
      Left            =   0
      TabIndex        =   0
      Top             =   720
      Width           =   735
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim RedBalls, BullBalls
Private Sub Command1_Click()
'Label1.Caption = ""
rarr = GetRndNotRepeat(0, UBound(RedBalls), 5)

For i = 1 To 5
t = Now
Do
DoEvents
Loop While DateDiff("s", t, Now) < 1.5
FillStyle = 0
FillColor = vbRed
Form1.Circle (900 + i * 900, 1600), 400, vbRed
CurrentX = 850 + i * 850
CurrentY = 1500
Print Format(RedBalls(rarr(i)))
Next i
t = Now


End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Form_Load()
RedBalls = Array("鱼香肉丝", "番茄炒蛋", "炒锅", "炒面", "剁椒鱼头")
'Label1.Caption = ""
Command1.Caption = "开始"
Command2.Caption = "退出"
Form1.FontSize = 15
Form1.FontName = "Arial"
Form1.ForeColor = &HFFFFFF
End Sub

Public Function GetRndNotRepeat(ByVal NumMin As Integer, ByVal NumMax As Integer, ByVal n As Integer)
Dim arr() As Integer
If n > NumMax - NumMin + 1 Then
ReDim arr(0)
arr(0) = 0
Else
ReDim arr(n)
Dim b() As Byte
Dim m As Integer
m = Int((NumMax - NumMin) / 8)
ReDim b(m)
Dim x As Integer, y As Integer
Dim z As Byte
Randomize
arr(0) = 1
For i = 1 To n
Do
x = Int(Rnd * (NumMax - NumMin + 1)) + NumMin
y = x - NumMin
z = 2 ^ (y Mod 8)
y = y \ 8
Loop While b(y) And z
b(y) = b(y) Or z
arr(i) = x
Next i
End If
GetRndNotRepeat = arr
End Function

⌨️ 快捷键说明

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