📄 frmtest.frm
字号:
VERSION 5.00
Begin VB.Form frmTester
AutoRedraw = -1 'True
Caption = "IEmployee Polymorphic Example"
ClientHeight = 1650
ClientLeft = 60
ClientTop = 345
ClientWidth = 6660
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form1"
ScaleHeight = 1650
ScaleWidth = 6660
StartUpPosition = 3 'Windows Default
End
Attribute VB_Name = "frmTester"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' Form module to exercise IEmployee,
' CBoss, CComissionWorker, CHourlyWorker,
' and CPieceWorker
Option Explicit
Private mEmployeeRef As IEmployee
Private mBoss As New CBoss
Private mCommissionWorker As New CCommissionWorker
Private mHourlyWorker As New CHourlyWorker
Private mPieceWorker As New CPieceWorker
Private Sub Form_Load()
With mBoss
.FirstName = "John"
.LastName = "Smith"
.WeeklySalary = 800
End With
Call Display(mBoss)
With mCommissionWorker
.FirstName = "Sue"
.LastName = "Jones"
.Quantity = 150
.Commission = 3
.Salary = 400
End With
Call Display(mCommissionWorker)
With mHourlyWorker
.FirstName = "Karen"
.LastName = "Price"
.Hours = 40
.Wage = 13.75
End With
Call Display(mHourlyWorker)
With mPieceWorker
.FirstName = "Bob"
.LastName = "Lewis"
.Quantity = 200
.WagePerPiece = 2.5
End With
Call Display(mPieceWorker)
End Sub
Private Sub Display(e As IEmployee)
Print e.ToString & " earned " & FormatCurrency(e.Earnings)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -