msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Syntax for CALLing an event procedure?

 
Post new topic   Reply to topic    msvisual.com Forum Index -> VB DOS
Author Message
budgie



Joined: 04 Oct 2007
Posts: 40

PostPosted: Fri Aug 17, 2007 5:28 pm    Post subject: Syntax for CALLing an event procedure? Reply with quote

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.

Archived from group: microsoft>public>vb>dos
Back to top
View user's profile Send private message
ArarghMail708NOSPAM



Joined: 04 Oct 2007
Posts: 1

PostPosted: Fri Aug 17, 2007 9:33 am    Post subject: Re: Syntax for CALLing an event procedure? Reply with quote

On Fri, 17 Aug 2007 13:28:27 +0800, budgie wrote:

>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.

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.

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
Passing Strings To Assembly Procedure Does VB/Dos set up the string descriptor in the same manor as QuickBASIC, first word contains the string length and then the pointer to the first character? This does not seem to be the case. I am working on a procedure that receives a string as one of t

Calling Oracle Stored Procedure This should be simple, but I am running into some problems.. I want o call this procedure, it requires a date as a input parameter and there is no output. I don't get any errors, but I know it is not working, because I have changed the data for this day

Click-Event procedure problem, Index as Integer Hi, I've just wanted to test (using VB 6, SP 5) some working (from a VB book) piece of code: It's quite stupid and goes like this: Private Sub Set objCustomer = frmKunde.Add End Sub It works just fine. When I try to write a procedure on my

Calling and Event from a string value or variable in VB6? Hello, Is there a way to call an event from a string in VB6? I know I've seen code that looks similar to the following; or ....at some point in my travels, but can't recall what

Howto: Event Logging to own event log? Hello all! I need to create my own event log and write myapp events: for example, to create event log and write to it my app events. How is it possible? Thanks, Alexander.
Post new topic   Reply to topic    msvisual.com Forum Index -> VB DOS All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group