Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed 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: 2,956
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: 53
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: 2,956
Default

You are right. The arrow keys are treated differently than other keys on the desktop.
You will need to use dzt's library: dzEventsMagic
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: 53
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trapping Other Keys Louis Questions & Help Needed 3 05-10-2008 07:20 AM
Using hw keys in MS Smartphone TomasNM Questions & Help Needed 4 02-25-2008 03:30 PM
Soft Keys on Smart Phones? Louis Questions & Help Needed 1 02-21-2008 05:49 AM
Capturing the arrow keys on the desktop Louis Questions & Help Needed 1 08-31-2007 09:01 PM
Menu handling with hardware keys miklquick Questions & Help Needed 8 07-13-2007 06:58 PM


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


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