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

📄 optionbutton.frm

📁 vb编程+从基础到实践光盘代码
💻 FRM
字号:
VERSION 5.00
Begin VB.Form OptionButton 
   Caption         =   "货币转换工具"
   ClientHeight    =   2865
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4095
   LinkTopic       =   "Form1"
   ScaleHeight     =   2865
   ScaleWidth      =   4095
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   1800
      TabIndex        =   8
      Top             =   2160
      Width           =   1335
   End
   Begin VB.OptionButton Option1 
      Caption         =   "转换成欧元"
      Height          =   495
      Index           =   3
      Left            =   2520
      TabIndex        =   6
      Top             =   1440
      Width           =   1455
   End
   Begin VB.OptionButton Option1 
      Caption         =   "转换成日元"
      Height          =   495
      Index           =   2
      Left            =   360
      TabIndex        =   5
      Top             =   1440
      Width           =   1575
   End
   Begin VB.OptionButton Option1 
      Caption         =   "转换成英磅"
      Height          =   495
      Index           =   1
      Left            =   2520
      TabIndex        =   4
      Top             =   720
      Width           =   1455
   End
   Begin VB.OptionButton Option1 
      Caption         =   "转换成美元"
      Height          =   495
      Index           =   0
      Left            =   360
      TabIndex        =   3
      Top             =   720
      Width           =   1455
   End
   Begin VB.TextBox Text1 
      Height          =   390
      Left            =   1680
      TabIndex        =   1
      Top             =   120
      Width           =   1575
   End
   Begin VB.Label Label4 
      Height          =   375
      Left            =   3240
      TabIndex        =   9
      Top             =   2160
      Width           =   735
   End
   Begin VB.Label Label3 
      Caption         =   "转换后为:"
      Height          =   375
      Left            =   480
      TabIndex        =   7
      Top             =   2280
      Width           =   975
   End
   Begin VB.Label Label2 
      Caption         =   "元"
      Height          =   255
      Left            =   3480
      TabIndex        =   2
      Top             =   240
      Width           =   495
   End
   Begin VB.Label Label1 
      Caption         =   "请输入人民币值"
      Height          =   255
      Left            =   120
      TabIndex        =   0
      Top             =   240
      Width           =   1335
   End
End
Attribute VB_Name = "OptionButton"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Option1_Click(Index As Integer)
Select Case Index
    Case 0
        Text2.Text = Val(Text1.Text) / 8.26     '把人民币换算成美元
        Label4.Caption = "美元"
     Case 1
        Text2.Text = Val(Text1.Text) / 15.47    '把人民币换算成英磅
        Label4.Caption = "英磅"
     Case 2
        Text2.Text = Val(Text1.Text) / 0.081    '把人民币换算成日元
        Label4.Caption = "日元"
     Case 3
        Text2.Text = Val(Text1.Text) / 10.8     '把人民币换算成欧元
        Label4.Caption = "欧元"
End Select
End Sub

⌨️ 快捷键说明

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