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

📄 vote.frm

📁 关于VB开发的教程
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "最佳网站投票演示"
   ClientHeight    =   4515
   ClientLeft      =   3630
   ClientTop       =   2625
   ClientWidth     =   5670
   ClipControls    =   0   'False
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4515
   ScaleWidth      =   5670
   ShowInTaskbar   =   0   'False
   Begin VB.CommandButton Command1 
      Caption         =   "退出程序"
      Height          =   375
      Index           =   1
      Left            =   4080
      TabIndex        =   12
      Top             =   3720
      Width           =   1455
   End
   Begin VB.CommandButton Command1 
      Caption         =   "显示输入框"
      Height          =   375
      Index           =   0
      Left            =   4080
      TabIndex        =   11
      Top             =   3000
      Width           =   1455
   End
   Begin VB.Frame Frame1 
      Caption         =   "输入框属性"
      Height          =   3855
      Left            =   240
      TabIndex        =   0
      Top             =   240
      Width           =   3495
      Begin VB.CheckBox Check1 
         Caption         =   "指定输入框位置"
         Height          =   255
         Left            =   240
         TabIndex        =   14
         Top             =   1920
         Width           =   3015
      End
      Begin VB.TextBox Text1 
         Enabled         =   0   'False
         Height          =   285
         Index           =   4
         Left            =   2400
         TabIndex        =   10
         Text            =   "0"
         Top             =   2520
         Width           =   735
      End
      Begin VB.TextBox Text1 
         Enabled         =   0   'False
         Height          =   285
         Index           =   3
         Left            =   840
         TabIndex        =   9
         Text            =   "0"
         Top             =   2520
         Width           =   735
      End
      Begin VB.TextBox Text1 
         Height          =   285
         Index           =   2
         Left            =   1200
         TabIndex        =   8
         Top             =   1320
         Width           =   2175
      End
      Begin VB.TextBox Text1 
         Height          =   285
         Index           =   1
         Left            =   1200
         TabIndex        =   7
         Top             =   840
         Width           =   2175
      End
      Begin VB.TextBox Text1 
         Height          =   285
         Index           =   0
         Left            =   1200
         TabIndex        =   6
         Top             =   360
         Width           =   2175
      End
      Begin VB.Label Label1 
         Height          =   555
         Index           =   5
         Left            =   360
         TabIndex        =   13
         Top             =   3120
         Width           =   2760
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "Y坐标"
         Enabled         =   0   'False
         Height          =   195
         Index           =   4
         Left            =   1800
         TabIndex        =   5
         Top             =   2520
         Width           =   465
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "X坐标"
         Enabled         =   0   'False
         Height          =   195
         Index           =   3
         Left            =   240
         TabIndex        =   4
         Top             =   2520
         Width           =   465
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "缺省网站"
         Height          =   195
         Index           =   2
         Left            =   240
         TabIndex        =   3
         Top             =   1320
         Width           =   720
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "标题"
         Height          =   195
         Index           =   1
         Left            =   240
         TabIndex        =   2
         Top             =   840
         Width           =   360
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "提示语句"
         Height          =   195
         Index           =   0
         Left            =   240
         TabIndex        =   1
         Top             =   360
         Width           =   720
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim PosChk As Boolean '检查X、Y坐标是否有效
Private Sub Check1_Click()
 If Check1.Value = 1 Then
  Label1(3).Enabled = True
  Label1(4).Enabled = True
  Text1(3).Enabled = True
  Text1(4).Enabled = True
  PosChk = True
 Else
  Label1(3).Enabled = False
  Label1(4).Enabled = False
  Text1(3).Enabled = False
  Text1(4).Enabled = False
  PosChk = False
 End If
End Sub

Private Sub Command1_Click(Index As Integer)
Dim Prompt, Title, Default As String
Dim xPos, yPos As Integer
 Select Case Index
   Case 0
     Prompt = Text1(0).Text
     Title = Text1(1).Text
     Default = Text1(2).Text
     If PosChk Then
       xPos = Val(Text1(3).Text)
       yPos = Val(Text1(4).Text)
       a$ = InputBox(Prompt, Title, Default, xPos, yPos)
     Else
       a$ = InputBox(Prompt, Title, Default, xPos, yPos)
     End If
     Label1(5).Caption = "谢谢您的投票,您的选择是" & a$ & "!"
   Case 1
     Unload Me
 End Select
 
End Sub

⌨️ 快捷键说明

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