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

📄 form1.frm

📁 本程序
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Begin VB.Form form1 
   BackColor       =   &H80000000&
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "进制转换器"
   ClientHeight    =   3120
   ClientLeft      =   3135
   ClientTop       =   3075
   ClientWidth     =   5250
   Icon            =   "form1.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3120
   ScaleWidth      =   5250
   ShowInTaskbar   =   0   'False
   Begin VB.Timer Timer1 
      Interval        =   100
      Left            =   240
      Top             =   1200
   End
   Begin VB.CommandButton x3 
      BackColor       =   &H80000010&
      Caption         =   "十进制计算"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   7.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2760
      TabIndex        =   9
      Top             =   2040
      Width           =   1095
   End
   Begin VB.CommandButton x2 
      BackColor       =   &H80000010&
      Caption         =   "十六进制计算"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   7.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1440
      TabIndex        =   8
      Top             =   2040
      Width           =   1095
   End
   Begin VB.CommandButton x1 
      BackColor       =   &H80000010&
      Caption         =   "二进制计算"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   7.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   120
      TabIndex        =   7
      Top             =   2040
      Width           =   1095
   End
   Begin VB.OptionButton an3 
      Caption         =   "十进制"
      CausesValidation=   0   'False
      Height          =   255
      Left            =   4080
      TabIndex        =   6
      Top             =   120
      Width           =   1095
   End
   Begin VB.OptionButton an2 
      Caption         =   "十六进制"
      CausesValidation=   0   'False
      Height          =   255
      Left            =   2520
      TabIndex        =   5
      Top             =   120
      Width           =   1215
   End
   Begin VB.OptionButton an1 
      Caption         =   "二进制"
      Height          =   255
      Left            =   1320
      TabIndex        =   4
      Top             =   120
      Width           =   975
   End
   Begin VB.TextBox Text2 
      CausesValidation=   0   'False
      Height          =   735
      Left            =   1080
      Locked          =   -1  'True
      MultiLine       =   -1  'True
      TabIndex        =   2
      Top             =   1080
      Width           =   4095
   End
   Begin VB.CommandButton x4 
      BackColor       =   &H00C0E0FF&
      Caption         =   "退出"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   4080
      TabIndex        =   1
      Top             =   2040
      Width           =   1095
   End
   Begin VB.TextBox Text1 
      CausesValidation=   0   'False
      Height          =   495
      Left            =   1080
      TabIndex        =   0
      Top             =   480
      Width           =   4095
   End
   Begin VB.Label Label6 
      Alignment       =   2  'Center
      Caption         =   "制作人:about"
      Height          =   255
      Left            =   2880
      TabIndex        =   14
      Top             =   2880
      Width           =   2295
   End
   Begin VB.Label Label5 
      Alignment       =   2  'Center
      Caption         =   "兄弟软件室"
      Height          =   255
      Left            =   2880
      TabIndex        =   13
      Top             =   2520
      Width           =   2175
   End
   Begin VB.Label Label4 
      Alignment       =   2  'Center
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   120
      TabIndex        =   12
      Top             =   2520
      Width           =   2535
   End
   Begin VB.Label Label3 
      Caption         =   "请选择:"
      Height          =   255
      Left            =   120
      TabIndex        =   11
      Top             =   120
      Width           =   855
   End
   Begin VB.Label Label2 
      Caption         =   "请输入:"
      Height          =   255
      Left            =   120
      TabIndex        =   10
      Top             =   480
      Width           =   855
   End
   Begin VB.Label Label1 
      Caption         =   "计算结果:"
      Height          =   255
      Left            =   120
      TabIndex        =   3
      Top             =   1320
      Width           =   975
   End
End
Attribute VB_Name = "form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub choice(tmp)
Select Case tmp
      Case "0000", "000", "00", "0": Text2.Text = "0" + Text2.Text
      Case "0001", "001", "01", "1": Text2.Text = "1" + Text2.Text
      Case "0010", "010", "10": Text2.Text = "2" + Text2.Text
      Case "0011", "011", "11": Text2.Text = "3" + Text2.Text
      Case "0100", "100": Text2.Text = "4" + Text2.Text
      Case "0101", "101": Text2.Text = "5" + Text2.Text
      Case "0110", "110": Text2.Text = "6" + Text2.Text
      Case "0111", "111": Text2.Text = "7" + Text2.Text
      Case "1000": Text2.Text = "8" + Text2.Text
      Case "1001": Text2.Text = "9" + Text2.Text
      Case "1010": Text2.Text = "a" + Text2.Text
      Case "1011": Text2.Text = "b" + Text2.Text
      Case "1100": Text2.Text = "c" + Text2.Text
      Case "1101": Text2.Text = "d" + Text2.Text
      Case "1110": Text2.Text = "e" + Text2.Text
      Case "1111": Text2.Text = "f" + Text2.Text
      Case Else: Text2.Text = "输入错误"
      End Select
End Sub
Private Sub Command1_Click()

End Sub

Private Sub Option1_Click()

End Sub

Private Sub an1_Click()
Text1.Text = ""
Text2.Text = ""
End Sub

Private Sub an2_Click()
Text1.Text = ""
Text2.Text = ""
End Sub

Private Sub an3_Click()
Text1.Text = ""
Text2.Text = ""
End Sub

Private Sub Form_Load()
form1.Hide
Form2.Show
an1.Value = False
an2.Value = False
an3.Value = False
End Sub
'Private Sub Timer1_Timer()
'form1.Label4.Caption = "现在是" & Date & " " & Time
'End Sub

Private Sub Timer1_Timer()
form1.Label4.Caption = "现在是" & Date & " " & Time
End Sub

Private Sub x1_Click()
'-----------二进制->二进制----------------
If an1.Value Then
Text2.Text = ""
If Text1.Text <> "" Then
l = Len(Text1.Text)
For i = 1 To l
    c = Mid(Text1.Text, i, 1)
    If c = "1" Or c = "0" Then

⌨️ 快捷键说明

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