Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Foreign Languages > German Forum
Home Register FAQ Members List Search Today's Posts Mark Forums Read


Buttontaste mit autorepeat wenn ich sie gedrückt halte


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-20-2008, 11:50 AM
Newbie
 
Join Date: Feb 2008
Posts: 6
Default Buttontaste mit autorepeat wenn ich sie gedrückt halte

Hallo zusammen,
ich bin neu hier und habe schon ein Problem:

Wenn ich die Buttontaste test gedrückt halte,
soll meine SUB test_Click das Zeichen an die
serielle Schnittstelle mehrmals (autorepeat) senden.

Bis jetzt sendet sie nur einmal pro "draufdrücken".

Könnt ihr mir helfen ?

Gruß
Wolfgang

PS Danke
Reply With Quote
  #2 (permalink)  
Old 02-20-2008, 02:31 PM
Knows the basics
 
Join Date: Apr 2007
Location: Steinheim, Germany
Posts: 61
Default

Hallo Wolfgang,
herzlich willkommen bei Basic4PPC.
Wer programmiert hat immer ein Problem und für dessen Lösung sind ja Foren da.
Das Ereignis test _click wird erst ausgelöst, wenn der Button wieder losgelassen wird. Wenn Du genau weißt wie oft etwas wiederholt werden muss, kannst Du folgendes probieren:
Code:
Sub Globals
	'Declare the global variables here.
End Sub

Sub App_Start 
	Form1.Show
End Sub


Sub Button1_Click
	For i = 0 To 100
		Form1.Text = i
		i = i + 1
		Sleep(100)
	Next
End Sub
Die Schnittstelle habe ich durch Form1.Text ersetzt. Das Sleep(100) dient nur dazu, dass Du besser siehst was passiert.

Gruß Wolfgang
__________________
Thanks for all
wolfgang
___________________
Desktop: Dual Core 3.0 GHz, XP SP3
Device: IPAQ 3970 WM 2003, Asus 632N WM5, HTC 3650 Cruise
GPS: Clip-on Bluetooth, Navman 3000
Reply With Quote
  #3 (permalink)  
Old 02-20-2008, 03:50 PM
Newbie
 
Join Date: Feb 2008
Posts: 6
Default Problem in teilen gelöst....

Hallo Wolfgang,

danke für die schnelle Antwort.

Leider brauche ich eine Lösung, die
mir nur solange "repeatet" wie ich draufdrücke.

Leider kann ich nicht vorhersagen wieviele Kommandos
notwendig sind.

Gibt es dafür eine andere Lösung ?

Gruß
Wolfgang
Reply With Quote
  #4 (permalink)  
Old 02-20-2008, 04:38 PM
Knows the basics
 
Join Date: Dec 2007
Posts: 69
Awards Showcase
Beta Tester 
Total Awards: 1
Default Probier das mal

Gruß

berndgoedecke
Attached Files
File Type: sbp ButtonLoop.sbp (676 Bytes, 10 views)
Reply With Quote
  #5 (permalink)  
Old 02-20-2008, 05:14 PM
Newbie
 
Join Date: Feb 2008
Posts: 6
Default dein testfile läuft - meins nicht

Hallo berndgoedecke,

danke dein file läuft.

Nur wenn ich das in meine Applikation kopiere
dann fehlen mir unter form1-button1 die Events ButoonDown und ButtonUp.

Was mache ich falsch ?

Gruß
Wolfgang
Reply With Quote
  #6 (permalink)  
Old 02-20-2008, 05:41 PM
Knows the basics
 
Join Date: Dec 2007
Posts: 69
Awards Showcase
Beta Tester 
Total Awards: 1
Default Es handelt sich um einen ImageButton

Gruß
berndgoedecke
Reply With Quote
  #7 (permalink)  
Old 02-20-2008, 06:30 PM
Newbie
 
Join Date: Feb 2008
Posts: 6
Default ups - ... habe ich nicht bemerkt ...

Dankeschön

Viele Grüße
Wolfgang
Reply With Quote
  #8 (permalink)  
Old 02-20-2008, 07:17 PM
Newbie
 
Join Date: Feb 2008
Posts: 6
Default buttonfarbe ändert sich nach tastendruck

hallo berndgoedecke,

leider wird der button nicht mehr grün
nachdem ich ihn gedrückt habe.

wie komme ich wieder zu meiner farbe?

schöne grüße
wolfgang
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 On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 12:50 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0