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

📄 form1.frm

📁 VB精彩百例
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   3705
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4440
   LinkTopic       =   "Form1"
   ScaleHeight     =   3705
   ScaleWidth      =   4440
   StartUpPosition =   3  'Windows Default
   Begin VB.TextBox max 
      Height          =   285
      Left            =   2520
      TabIndex        =   5
      Text            =   "Text1"
      Top             =   1320
      Width           =   735
   End
   Begin VB.TextBox min 
      Height          =   285
      Left            =   1200
      TabIndex        =   4
      Text            =   "Text1"
      Top             =   1320
      Width           =   735
   End
   Begin VB.CommandButton cmd_random 
      Caption         =   "Random!"
      Height          =   375
      Left            =   1560
      TabIndex        =   0
      Top             =   600
      Width           =   1335
   End
   Begin VB.Label Label2 
      Caption         =   "Between"
      Height          =   255
      Left            =   360
      TabIndex        =   3
      Top             =   1320
      Width           =   735
   End
   Begin VB.Label result 
      Height          =   615
      Left            =   840
      TabIndex        =   2
      Top             =   2040
      Visible         =   0   'False
      Width           =   2895
   End
   Begin VB.Label Label1 
      Caption         =   "To"
      Height          =   255
      Left            =   2040
      TabIndex        =   1
      Top             =   1320
      Width           =   375
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim score As Long
Private Sub cmd_random_Click()

If Not min.Text = "" And Not max.Text = "" Then
  Randomize
  score = Rnd * (max.Text - min.Text) + min.Text
  result.Visible = True
  result.Caption = "Your random number is: " & score
Else
  result.Visible = True
  result.Caption = "You need to enter limits!"
End If

End Sub

Private Sub Form_Load()

min.Text = ""
max.Text = ""

End Sub

⌨️ 快捷键说明

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