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.

Game and keys

Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 06-01-2008, 02:17 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

The values are: cUpKey, cDownKey, cLeftKey, cRightKey
Reply With Quote
  #12 (permalink)  
Old 06-01-2008, 02:50 PM
pmu5757's Avatar
Knows the basics
 
Join Date: Sep 2007
Location: Metz (France)
Posts: 67
Default

Thank you Erel, but I don't succeed in coding that.
Here is my code (in fact too attempts in the same code but neither the one nor the other works).
Could you tell me what's wrong : I just want to make the button move by typing on the arrows.
Thank you.

Code:
Sub Globals
    
'Declare the global variables here.

End Sub

Sub App_Start
    Form1.Show
    Button1.Focus
    
End Sub


Sub Button1_KeyPress (key)
    
If Key=cUpKey Then
        Button1.Top=Button1.Top+
5
    
End If
End Sub

Sub Form1_KeyPress (specialKey)
    
Select SpecialKey
 
Case cUpKey
  Button1.Top=Button1.Top+
5
 
Case cDownKey
 Button1.Top=Button1.Top-
5
End Select
End Sub
__________________
Pascal
Reply With Quote
  #13 (permalink)  
Old 06-01-2008, 03:25 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

You are right. The arrow keys are treated differently than other keys on the desktop.
You will need to use dzt's library: http://www.basic4ppc.com/forum/addit...entsmagic.html
See the first example.
Reply With Quote
  #14 (permalink)  
Old 06-01-2008, 03:56 PM
pmu5757's Avatar
Knows the basics
 
Join Date: Sep 2007
Location: Metz (France)
Posts: 67
Default

Thank you, it works very well !
__________________
Pascal
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
ide and arrow keys dennishea Questions (Windows Mobile) 0 09-22-2008 09:45 PM
A little game I put together ...... taximania Share Your Creations 0 12-30-2007 07:48 PM
New game maxtillberg Share Your Creations 1 10-29-2007 09:27 PM
[GAME] Merchants legugusse Share Your Creations 4 07-11-2007 08:36 AM
Game jorgerhv Share Your Creations 0 05-20-2007 12:09 AM


All times are GMT. The time now is 09:30 AM.


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