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.

Problem using AddEvent

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-09-2007, 07:50 AM
EdQas's Avatar
Junior Member
 
Join Date: Aug 2007
Location: French Riviera
Posts: 35
Default Problem using AddEvent

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 by EdQas : 09-09-2007 at 07:54 AM.
Reply With Quote
  #2 (permalink)  
Old 09-09-2007, 07:57 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,734
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

You can only use events that are supported by the control.
Try changing it to:
AddEvent("Lc",GotFocus,"MySub")
Reply With Quote
  #3 (permalink)  
Old 09-09-2007, 08:19 AM
EdQas's Avatar
Junior Member
 
Join Date: Aug 2007
Location: French Riviera
Posts: 35
Default AddEvent

Hello Erel,
I already tried to use with "GotFocus" and it's the same thing; impossible to the program to enter in "MySub".
Reply With Quote
  #4 (permalink)  
Old 09-09-2007, 08:26 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,734
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Try the attached code.
Attached Files
File Type: sbp a.sbp (593 Bytes, 16 views)
Reply With Quote
  #5 (permalink)  
Old 09-09-2007, 08:34 AM
EdQas's Avatar
Junior Member
 
Join Date: Aug 2007
Location: French Riviera
Posts: 35
Thumbs up 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]



Thank you very much Erel !

EdQas
Reply With Quote
  #6 (permalink)  
Old 09-09-2007, 08:35 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,734
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Lol
Reply With Quote
  #7 (permalink)  
Old 09-09-2007, 09:04 AM
Senior Member
 
Join Date: Jul 2007
Location: Michigan Usa
Posts: 176
Awards Showcase
Beta Tester 
Total Awards: 1
Default

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
Reply With Quote
  #8 (permalink)  
Old 09-09-2007, 09:51 AM
EdQas's Avatar
Junior Member
 
Join Date: Aug 2007
Location: French Riviera
Posts: 35
Default

Good idea !
Thank you.
Have a nice sunday.
__________________

Dell Axim x51v
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
AddEvent & ImageButton in IDE agraham Bug Reports 1 09-10-2008 08:31 PM
AddEvent with ComboBox erik58 Questions (Windows Mobile) 2 05-24-2008 02:38 PM
AddEvent but no RemoveEvent?? LineCutter Questions (Windows Mobile) 2 04-19-2008 05:09 PM
Problem with AddEvent and ImageList Haschi0 Questions (Windows Mobile) 7 03-01-2008 11:06 AM
Addevent Table tvrman Questions (Windows Mobile) 3 09-30-2007 06:33 AM


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


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