📄 v6j04-04.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text3
Height = 495
Left = 2760
TabIndex = 3
Text = "86"
Top = 1500
Width = 795
End
Begin VB.TextBox Text2
Height = 495
Left = 1530
TabIndex = 2
Text = "56"
Top = 1500
Width = 795
End
Begin VB.CommandButton Command1
Caption = "排序"
Height = 495
Left = 3030
TabIndex = 1
Top = 2580
Width = 1245
End
Begin VB.TextBox Text1
Height = 495
Left = 360
TabIndex = 0
Text = "90"
Top = 1500
Width = 795
End
Begin VB.Label Label1
Caption = "Z"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 2
Left = 2490
TabIndex = 6
Top = 1560
Width = 375
End
Begin VB.Label Label1
Caption = "X"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 1
Left = 1290
TabIndex = 5
Top = 1560
Width = 375
End
Begin VB.Label Label1
Caption = "X"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Index = 0
Left = 150
TabIndex = 4
Top = 1560
Width = 375
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
x = Val(Text1)
y = Val(Text2)
z = Val(Text3)
If x < y Then
t = x: x = y: y = t ' x与y交换
End If ' 使得x>y
If y < z Then
t = y: y = z: z = t ' y与z交换使得y>z
If x < y Then ' 此时的x,y已不是原x,y的值
t = x: x = y: y = t
End If
End If
Print "X="; x, "Y="; y, "Z="; z
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -