function call as event replacement (2nd, Q210207)

S

stefan hoffmann

hi,

I'd like to put that piece of code mentioned in Q210207
(http://support.microsoft.com/?kbid=210207) into a public function, call
it FormDisableCRLF, and use it as an event call.

Normally the event procedure called has a signature of (KeyCode As
Integer, Shift As Integer). My function has the same signature.

But the remaining question is how to pass the event values (KeyCode,
Shift) to my function call (=FormDisableCRLF([KeyCode];[Shift]) in the
OnKeyDown event)?

Help is welcome.

--> stefan <--
 
D

Dan Artuso

Hi,
You have to call your function from within the OnKeyDown event.
You won't simply be able to enter it directly on the property sheet.

Sub Text1_KeyDown (keycode As Integer, shift As Integer)
FormDisableCRLF keycode,shift
End Sub
 
S

stefan hoffmann

Hi,

Dan said:
You have to call your function from within the OnKeyDown event.
You won't simply be able to enter it directly on the property sheet.

That is what i'm worried about. Don't think it's clean solution.

--> stefan <--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top