⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.bas

📁 VB圣经
💻 BAS
字号:
Attribute VB_Name = "modMain"
'***************************************************************
' (c) Copyright 2000 Matthew J. Curland
'
' This file is from the CD-ROM accompanying the book:
' Advanced Visual Basic 6: Power Techniques for Everyday Programs
'   Author: Matthew Curland
'   Published by: Addison-Wesley, July 2000
'   ISBN: 0-201-70712-8
'   http://www.PowerVB.com
'***************************************************************
Option Explicit

Sub Main()
Dim pUnk As IUnknown
Dim pDerived As Derived
    InitVBoost
    Set pDerived = New Derived
    
    'This will call the original function
    MsgBox pDerived.OverrideMe
    
    'Force a QI to call the override. This is
    'only necessary for objects in the same
    'project. If New is called against an external
    'object, then VB always does a QI.
    Set pUnk = pDerived
    Set pDerived = pUnk
    MsgBox pDerived.OverrideMe
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -