Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

1 sub for multiple events

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-01-2009, 10:53 PM
Junior Member
 
Join Date: Oct 2009
Location: London
Posts: 43
Default 1 sub for multiple events

Hi is it possible to have one sub manage multiple events?
i.e. I have some code
Sub ib0_click
move=0
checkplay
End Sub

Sub ib1_click
move=1
checkplay
End Sub

Sub ib2_click
move=2
checkplay
End Sub

and so on for 52 seperate events, where ib1,ib2,ib3,ibx... are imagebuttons

Is there a way to combine these into a single sub that could manage all the click events for all the image buttons, by somehow identifying the control that triggered the event?
Reply With Quote
  #2 (permalink)  
Old 12-02-2009, 05:52 AM
Knows the basics
 
Join Date: Apr 2007
Location: Steinheim, Germany
Posts: 91
Default 1 sub for multiple events

Hi,
maybe something like this (example with 5 buttons)?
Attached Files
File Type: sbp multisub.sbp (1.1 KB, 17 views)
__________________
Thanks for all
wolfgang
___________________
Desktop: Dual Core 3.0 GHz, Win7
Device: IPAQ 3970 WM 2003, Asus 632N WM5, HTC 3650 Cruise
GPS: iblue 747
Reply With Quote
  #3 (permalink)  
Old 12-02-2009, 07:30 AM
Junior Member
 
Join Date: Oct 2009
Location: London
Posts: 43
Default

Thanks Wolfgang, I knew there must be a simple way to do this, really appreciate your help.
Simon.
Reply With Quote
  #4 (permalink)  
Old 12-04-2009, 01:03 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,734
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

This tutorial covers similar issues: http://www.basic4ppc.com/forum/tutor...ipulation.html
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Events for PIM (Outlook) related events dreamcove Questions (Windows Mobile) 1 02-14-2009 11:00 AM
Public Events Cableguy Basic4ppc Wishlist 2 01-04-2009 09:10 PM
Modules and Events Cableguy Questions (Windows Mobile) 6 01-04-2009 06:31 PM
textBox : add TextChanged events or other events abys Code Samples & Tips 1 09-01-2008 06:41 PM
more events Sven Kommers Basic4ppc Wishlist 3 06-08-2007 09:53 AM


All times are GMT. The time now is 10:36 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0