把下列代码复制到一个文本文件当中,并且重命名为:1frm。打开运行即可。
VERSION 500
Begin VBForm Form1
Caption = "Form1"
ClientHeight = 5040
ClientLeft = 60
ClientTop = 450
ClientWidth = 9450
LinkTopic = "Form1"
ScaleHeight = 5040
ScaleWidth = 9450
StartUpPosition = 3 '窗口缺省
Begin VBTextBox Text2
Height = 735
Left = 6840
TabIndex = 7
Text = "0"
Top = 2400
Width = 1215
End
Begin VBTextBox Text1
Height = 735
Left = 4440
TabIndex = 6
Text = "0"
Top = 2400
Width = 1215
End
Begin VBOptionButton Option5
Caption = "摄氏度、华氏度换算"
BeginProperty Font
Name = "宋体"
Size = 105
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1080
TabIndex = 5
Top = 3360
Width = 2295
End
Begin VBOptionButton Option4
Caption = "磅、公斤换算"
BeginProperty Font
Name = "宋体"
Size = 105
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1080
TabIndex = 4
Top = 2880
Width = 1695
End
Begin VBOptionButton Option3
Caption = "英里、公里换算"
BeginProperty Font
Name = "宋体"
Size = 105
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1080
TabIndex = 3
Top = 2400
Width = 1815
End
Begin VBOptionButton Option2
Caption = "英尺、米换算"
BeginProperty Font
Name = "宋体"
Size = 105
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1080
TabIndex = 2
Top = 1920
Width = 1695
End
Begin VBOptionButton Option1
Caption = "分秒换算"
BeginProperty Font
Name = "宋体"
Size = 105
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1080
TabIndex = 1
Top = 1440
Value = -1 'True
Width = 1215
End
Begin VBLabel Label3
Alignment = 2 'Center
Caption = "秒"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 6720
TabIndex = 9
Top = 1800
Width = 1455
End
Begin VBLabel Label2
Alignment = 2 'Center
Caption = "分"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 4320
TabIndex = 8
Top = 1800
Width = 1455
End
Begin VBLabel Label1
Caption = "常用单位换算"
BeginProperty Font
Name = "隶书"
Size = 42
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 855
Left = 1920
TabIndex = 0
Top = 240
Width = 5295
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim t As Integer
Private Sub Option1_Click()
Label2Caption = "分"
Label3Caption = "秒"
t = 0
Text1Text = "0"
Text2Text = "0"
End Sub
Private Sub Option2_Click()
Label2Caption = "英尺"
Label3Caption = "米"
t = 1
Text1Text = "0"
Text2Text = "0"
End Sub
Private Sub Option3_Click()
Label2Caption = "英里"
Label3Caption = "公里"
t = 2
Text1Text = "0"
Text2Text = "0"
End Sub
Private Sub Option4_Click()
Label2Caption = "磅"
Label3Caption = "公斤"
t = 3
Text1Text = "0"
Text2Text = "0"
End Sub
Private Sub Option5_Click()
Label2Caption = "摄氏度"
Label3Caption = "华氏度"
t = 4
Text1Text = "0"
Text2Text = "0"
End Sub
Private Sub Text1_Change()
Dim A As Single
If ActiveControl = Text1 Then
A = Val(Text1Text)
Select Case t
Case 0: Text2Text = Format(A 60, "0000")
Case 1: Text2Text = Format(A / 328089, "0000")
Case 2: Text2Text = Format(A / 0621382, "0000")
Case 3: Text2Text = Format(A / 220462, "0000")
Case 4: Text2Text = Format(A 5 / 9 + 32, "0000")
End Select
End If
End Sub
Private Sub Text2_Change()
Dim A As Single
If ActiveControl = Text2 Then
A = Val(Text2Text)
Select Case t
Case 0: Text1Text = Format(A / 60, "0000")
Case 1: Text1Text = Format(A 328089, "0000")
Case 2: Text1Text = Format(A 0621382, "0000")
Case 3: Text1Text = Format(A 220462, "0000")
Case 4: Text1Text = Format((A - 32) / 5 9, "0000")
End Select
End If
End Sub
使用win键或者是左键单击windows开始,在下面的搜索框中输入计算器。
接下来就能看到搜索的最上面会匹配出来计算器,单击就能打开。
系统自带的计算器工具放桌面方法:
点击桌面左下角的开始菜单。
在查找输入框中输入“calcexe”。
在查找到的文件中,右下所示,右击选择“属性”。
在属性对话框中可以看到计算器工具所在的位置:C:\Windows\System32目录下。
然后我们打开资源管理器(此电脑),打开C盘。
在C盘目录下找到Windows文件夹,点击打开。
在Windows文件夹下找到System32目录,点击打开。
进入到System32目录后找到calcexe这个软件,将它复制到桌面。
放到桌面后,双击打开,可以正常运行。
以上就是关于如何使用Windows10的内置货币转换器全部的内容,包括:如何使用Windows10的内置货币转换器、复杂计算器C#程序、求一个VB编写的单位换算小程序等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)