?? frmtest.frm
字號:
VERSION 5.00
Begin VB.Form frmTester
AutoRedraw = -1 'True
Caption = "IEmployee2 Delegation Example"
ClientHeight = 1650
ClientLeft = 4680
ClientTop = 5175
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
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 IEmployee2,
' CBoss2 and CComissionWorker2
Option Explicit
Private mEmployeeRef As IEmployee2
Private mBoss As New CBoss2
Private mCommissionWorker As New CCommissionWorker2
Private Sub Form_Load()
Set mEmployeeRef = mBoss
mEmployeeRef.FirstName = "John"
mEmployeeRef.LastName = "Smith"
mBoss.WeeklySalary = 800
Call Display(mBoss)
Set mEmployeeRef = mCommissionWorker
With mCommissionWorker
.Commission = 3
.Salary = 400
.Quantity = 150
End With
mEmployeeRef.FirstName = "Sue"
mEmployeeRef.LastName = "Jones"
Call Display(mCommissionWorker)
End Sub
Private Sub Display(e As IEmployee2)
If (TypeOf e Is CBoss2) Then
Print "Type CCBoss2"
ElseIf (TypeOf e Is CCommissionWorker2) Then
Print "Type CCommissionWorker2"
End If
Print e.ToString & " earned " & FormatCurrency(e.Earnings)
Print
End Sub
Private Sub Form_Terminate()
Set mBoss = Nothing
Set mCommissionWorker = Nothing
Set mEmployeeRef = Nothing
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -