The only two standart control in B4PPc that suport "keyPress Event" are the Button and the Textbox.
Other controls have similar events...
You can change the default event triggered by adding an event...
For instance you want the same code to de used in more than one event, but That would cause too much code lines...
so just add an extra event that will overRide the default event of the control:
AddEvent("Button1",KeyPress,"MySub")
AddEvent("TextBox1",KeyPress,"MySub")
This will cause that both keypress events will be "linking" to the same Sub...
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!
|