function call as event replacement (2nd, Q210207)

  • Thread starter Thread starter stefan hoffmann
  • Start date Start date
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 <--
 
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
 
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 <--
 
Back
Top