Problem using AddEvent

EdQas

Member
Licensed User
My program is like that :

Sub App_Start
...
AddEvent("Lc",Click,"MySub") -> Lc is a textbox
...
End Sub

Sub MySub
MyKey=sender
Select MyKey
Case "Lc"
...
End Select
End Sub

When i run the program and i click in my textbox, the program doesn't go to "MySub"

Anybody can help me ?

Thank you !

EdQas
 
Last edited:

EdQas

Member
Licensed User
AddEvent

Hello Erel,
I already tried to use with "GotFocus" and it's the same thing; impossible to the program to enter in "MySub".
 

EdQas

Member
Licensed User
AddEvent

In fact, Erel, i put a "break" just after Sub MySub. The program enters in "MySub" but having nothing to "break", the program goes on correctly.

Beginning is difficult, i'm loosing my hair !!! [look to my avatar]

:sign0144:

Thank you very much Erel !

EdQas
 

dennishea

Active Member
Licensed User
I not sure if this satisfys what your trying to do but it works.

Sub Globals
'Declare the global variables here.
MyKey = "Lc"
End Sub

Sub App_Start
MySub
form1.Show
End Sub

Sub MySub
Select MyKey
Case "Lc"
Label1.Text = "Hi"
label1.Visible = true
End Select
End Sub

dennishea
 
Top