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

Go Back   Android Development Forum - Basic4android > Foreign Languages > Italian Forum
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

"Button State"?

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-01-2012, 07:32 AM
rubino25's Avatar
Junior Member
 
Join Date: Jan 2012
Posts: 40
Default "Button State"?

Sono mooolto sia di android che di visual basic.. Ho la necessità di inviare dei dati tramite bluetooth solo quando tengo premuto un pulsante. In vb6 non era un problema, credo fosse button.ispressed o similare.. ma qua proprio non ci salto fuori.. Qualcuno ha qualche metodo?
Reply With Quote
  #2 (permalink)  
Old 02-01-2012, 05:49 PM
Filippo's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Schwäb. Gmünd, Germany
Posts: 977
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Ciao rubino25,

se non sbaglio l'evento "Button_Down" dovrebbe avere nel tuo caso la stessa funzione di "button.ispressed".


Ciao,
Filippo
__________________
PPC: MDA Pro, 2GB SD
Device: HTC Desire , Android 2.2
______________________
Reply With Quote
  #3 (permalink)  
Old 02-02-2012, 09:46 AM
rubino25's Avatar
Junior Member
 
Join Date: Jan 2012
Posts: 40
Default

Ciao e grazie..
Ho provato ma funziona solo alla prima pressione del pulsante! In sostanza crea un evento e basta.. Nella sezione inglese, che frequento poco dato la mia scarsa conoscenza, mi dicevano di usare l'vento click!
Reply With Quote
  #4 (permalink)  
Old 02-02-2012, 10:02 AM
Filippo's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Schwäb. Gmünd, Germany
Posts: 977
Awards Showcase
Beta Tester 
Total Awards: 1
Default

E allora prova questo esempio con un Timer:
Code:
Sub Globals
    
Dim Button1 As Button
    
Dim timer1 As Timer
End Sub

Sub Activity_Create(FirstTime As Boolean)

    timer1.Initialize(
"timer1",20)
End Sub

Sub Button1_Down
    
Log("Button1_Down")
    timer1.Enabled=
True
End Sub

Sub Button1_Up
    
Log("Button1_Up")
    timer1.Enabled=
False
End Sub

Sub timer1_Tick
    
Log("invia Dati")    
End Sub
__________________
PPC: MDA Pro, 2GB SD
Device: HTC Desire , Android 2.2
______________________
Reply With Quote
  #5 (permalink)  
Old 02-02-2012, 07:18 PM
rubino25's Avatar
Junior Member
 
Join Date: Jan 2012
Posts: 40
Default

L'avevo notato.. ma credevo esistesse qualcosa creato apposta.. Comuqneu lo provo e poi ti faccio sapere! Grazie..
Reply With Quote
  #6 (permalink)  
Old 02-05-2012, 01:00 PM
rubino25's Avatar
Junior Member
 
Join Date: Jan 2012
Posts: 40
Default

Fatto.. alla fine ho usato gli eventi Down e Up! Grazie comunque..
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
[Wish] Wiki new entry and extra "back to forum" button Cableguy Bugs & wishlist 1 01-18-2012 03:46 PM
adding an item to the "menu" button during a call lawaorder Basic4android Updates and Questions 2 12-09-2011 05:45 AM
Select an item in spinner will make a button or view "gone" Asmoro Basic4android Updates and Questions 16 06-30-2011 09:01 AM
Catching the "Shift", "right" & "left" keys linum Questions (Windows Mobile) 3 08-21-2009 01:22 PM
Image Button kommt nicht wieder "hoch" troll German Forum 3 02-22-2008 09:03 AM


All times are GMT. The time now is 11:42 PM.


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