Thread: Game and keys
View Single Post
  #9 (permalink)  
Old 06-01-2008, 12:45 PM
Cableguy's Avatar
Cableguy Cableguy is offline
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

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!
Reply With Quote