VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 2775
ClientLeft = 60
ClientTop = 450
ClientWidth = 3810
LinkTopic = "Form1"
ScaleHeight = 2775
ScaleWidth = 3810
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text1
Height = 375
Left = 1260
TabIndex = 1
Top = 480
Width = 2055
End
Begin VB.CommandButton Command1
Caption = "计算"
Height = 375
Left = 840
TabIndex = 0
Top = 2100
Width = 1995
End
Begin VB.Label Label2
Caption = "变动前工资"
Height = 315
Left = 240
TabIndex = 3
Top = 540
Width = 915
End
Begin VB.Label Label1
Caption = "变动后工资"
Height = 435
Left = 180
TabIndex = 2
Top = 1260
Width = 3135
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()
Dim n As Double
n = CDbl(Text1)
If n >= 800 Then
n = n * 1.2
ElseIf n < 600 Then
n = n * 1.1
Else
n = n * 1.15
End If
Label1.Caption = "变动后工资:" & n
End Sub
Private Sub Command1_Click()
Dim n As Double
n = CDbl(Text1)
If n >= 800 Then
n = n * 1.2
ElseIf n < 600 Then
n = n * 1.1
Else
n = n * 1.15
End If
Label1.Caption = n
End Sub