【VB开源代码栏目提醒】:网学会员在VB开源代码频道为大家收集整理了Ex2_5.frm提供大家参考,希望对大家有所帮助!
VERSION 5.00
Begin VB.Form Ex2_5
Caption = "Form1"
ClientHeight = 1875
ClientLeft = 60
ClientTop = 450
ClientWidth = 4140
LinkTopic = "Form1"
ScaleHeight = 1875
ScaleWidth = 4140
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text2
Height = 390
Left = 2400
TabIndex = 6
Top = 1200
Width = 1095
End
Begin VB.TextBox Text1
Height = 375
Left = 2400
TabIndex = 5
Top = 600
Width = 1095
End
Begin VB.CommandButton Command2
Caption = "OR"
Height = 375
Left = 600
TabIndex = 2
Top = 1200
Width = 735
End
Begin VB.CommandButton Command1
Caption = "AND"
Height = 375
Left = 600
TabIndex = 1
Top = 600
Width = 735
End
Begin
VB.Label Label3
Caption = "结果"
Height = 255
Left = 1680
TabIndex = 4
Top = 1320
Width = 495
End
Begin VB.Label Label2
Caption = "结果"
Height = 255
Left = 1680
TabIndex = 3
Top = 720
Width = 495
End
Begin VB.Label Label1
Caption = "表达式(10>5)和(8>20)的逻辑运算"
Height = 255
Left = 600
TabIndex = 0
Top = 240
Width = 3255
End
End
Attribute VB_Name = "Ex2_5"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If (10 > 5 And 8 > 20) = True Then
Text1.Text = "True"
Else
Text1.Text = "False"
End If
End Sub
Private Sub Command2_Click()
If (10 > 5 Or 8 > 20) = True Then
Text2.Text = "True"
Else
Text2.Text = "False"
End If
End Sub