Hi,
The easiest way is to make sure you are working with the Windows Mobile 5.0
SDK. For example in Visual Studio 2005, use Visual C#, and Smart Device, and
Windows Mobile 5.0 Pocket PC, and Device Application. By default a form with
a menu that supports soft keys is created.
The following article may help.
Controls_: using the soft keys for a Sudoku solver app
http://netcf2.blogspot.com/2005/11/controls-using-soft-keys-for-sudoku.html
Windows Mobile 5.0 SDK for Pocket PC
http://www.microsoft.com/downloads/...F2-F524-4EC5-9155-717CBE5D25ED&displaylang=en
If you would like to support hard keys as well you could code that part
yourself:
private void menuItem1_Click(object sender, EventArgs e)
{
// your code here
}
private void Form1_KeyPress(object sender, KeyPressEventArgs e)
{
menuItem1_Click(this, new EventArgs());
}
Or you could just refactor the code:
private void menuItem1_Click(object sender, EventArgs e)
{
NewMethod();
}
private void Form1_KeyPress(object sender, KeyPressEventArgs e)
{
NewMethod();
}
private void NewMethod()
{
// your code here
}
hope that helps,
Chris Craft
http://www.cjcraft.com/blog/