9.0
261
Example
Sub Main
Dim
App As Object
Set
App = CreateObject("WinWrap.CppDemoApplication")
With App
.Move 20,30 ' move icon to 20,30
End
With
End
Sub
WithEvents Definition
Syntax
[Dim | Private | Public] _
WithEvents name
As objtype[, ...]
Group
Declaration
Description
Dimensioning a module level variable WithEvents allows the macro to implement event handling Subs. The
variable's As type must be a type from a referenced type library (or language extension) which implements events.
See Also: Dim
, Private, Public.
Example
Dim WithEvents X As Thing
C:\ABCTemp\vbs\Sub_Definition.htm
Sub
Main
Set
X = New Thing
X.DoIt ' DoIt method raises DoingIt event
End
Sub
C:\ABCTemp\vbs\Private_Keyword.htm
Private
Sub X_DoingIt
Debug
.Print "X.DoingIt event"
End
Sub
Write Instruction
Syntax
Write #StreamNum, expr[, ...]
Group
File










