Discussion:
Syntax for CALLing an event procedure?
(too old to reply)
budgie
2007-08-17 05:28:27 UTC
Permalink
I knew I'd seen it somewhere, but could never find it - until now, doing a
browse of the VBDOS Programmer's Guide.

From the top of p41:

"Event procedures are SUB procedures found in form modules that are executed
when a user action or system event occurs. You can also explicitly call an
event procedure by using the CALL statement."

The capability in that last line has always escaped me. I have tried a variety
of CALL constructions without any joy, invariably attracting a "syntax error"
message.

So were the MS documenting committe on something when they wrote that, or can it
be done? If anyone can provide me with a working CALL construct to invoke say a
SUB cmdOK_Click () I'd appreciate it.
A***@NOT.AT.Arargh.com
2007-08-17 10:33:13 UTC
Permalink
Post by budgie
I knew I'd seen it somewhere, but could never find it - until now, doing a
browse of the VBDOS Programmer's Guide.
"Event procedures are SUB procedures found in form modules that are executed
when a user action or system event occurs. You can also explicitly call an
event procedure by using the CALL statement."
The capability in that last line has always escaped me. I have tried a variety
of CALL constructions without any joy, invariably attracting a "syntax error"
message.
So were the MS documenting committe on something when they wrote that, or can it
be done? If anyone can provide me with a working CALL construct to invoke say a
SUB cmdOK_Click () I'd appreciate it.
Without trying it, I would think:

cmdOK_Click

However, a declare may be needed or it might only work from the same
file, in which case you would need a wrapper sub.

I just checked some VBDOS source code (from someone else) and it is
used there, but in the same source file, with a declare.
--
ArarghMail708 at [drop the 'http://www.' from ->] http://www.arargh.com
BCET Basic Compiler Page: http://www.arargh.com/basic/index.html

To reply by email, remove the extra stuff from the reply address.
Loading...