Actually, what I should have replied to you is: don't try to trap the back
key since it violates the guidelines. If you need to control user entry and
(with no controls on it). So, from what you say, the listview is not capable
of handling the back key (sorry I cannot test that right now). Since there
<peter@peterkellner.net> wrote in message
news:1122821457.494421.312570@f14g2000cwb.googlegroups.com...
>I found the section at the bottom on keys and backspace. It suggests I
> trap with keypress which is what I am doing but those lines never get
> processed when I set my debugger to stop there. (just with the
> backspace). It's a bit lengthy, but I've pasted the simplest code I
> can to make this example. Thanks for any help on this. (I tried
> stopping in the keypress event of the form also but that didn't hep
> either)
>
> Stuck, -Peter
>
> public class Formtest : System.Windows.Forms.Form
> {
> private ListView listView1;
> /// <summary>
> /// Main menu for the form.
> /// </summary>
> private System.Windows.Forms.MainMenu mainMenu1;
>
> public Formtest()
> {
> InitializeComponent();
> }
>
> /// <summary>
> /// Clean up any resources being used.
> /// </summary>
> protected override void Dispose(bool disposing)
> {
> base.Dispose(disposing);
> }
>
> #region Windows Form Designer generated code
>
> /// <summary>
> /// Required method for Designer support - do not modify
> /// the contents of this method with the code editor.
> /// </summary>
> private void InitializeComponent()
> {
> this.mainMenu1 = new System.Windows.Forms.MainMenu();
> this.listView1 = new System.Windows.Forms.ListView();
> //
> // listView1
> //
> this.listView1.Location = new System.Drawing.Point(17, 15);
> this.listView1.Size = new System.Drawing.Size(140, 138);
> this.listView1.KeyPress += new
> System.Windows.Forms.KeyPressEventHandler(this.listView1_KeyPress);
> //
> // Formtest
> //
> this.ClientSize = new System.Drawing.Size(176, 180);
> this.Controls.Add(this.listView1);
> this.Menu = this.mainMenu1;
> this.Text = "Formtest";
> this.KeyPress += new
> System.Windows.Forms.KeyPressEventHandler(this.Formtest_KeyPress);
>
> }
>
> #endregion
>
> private void listView1_KeyPress(object sender,
> KeyPressEventArgs e)
> {
> // Set Debug Stop
> }
>
> private void Formtest_KeyPress(object sender, KeyPressEventArgs
> e)
> {
> // Set Debug Stop
> }
>
>
>
>
> }
>
>
>
> Daniel Moth wrote:
>> See if the first link at the bottom of this entry helps:
>>
http://www.danielmoth.com/Blog/2005/03/smartphone-development-quick-start.html >>
>> Cheers
>> Daniel
>> --
>>
http://www.danielmoth.com/Blog/ >>
>>
>> "Peter Kellner" <peter@peterkellner.net> wrote in message
>> news:MPG.1d55f3c2feac7f93989686@news.sf.sbcglobal.net...
>> >I have a listview on my smartphone and I can trap the dial number keys
>> > with the event:
>> >
>> > this.listViewCategories.KeyPress += new
>> > System.Windows.Forms.KeyPressEventHandler
>> > (this.listViewCategories_KeyPress);
>> >
>> > When I press the backspace, it takes me out of the application. I want
>> > similar behavior to how the contact manager works where you can press
>> > numbers on the keypad and backspace to untype them.
>> >
>> > Thanks for any tips on this
>> >
>> >
>> > --
>> > Peter Kellner
>> >
http://peterkellner.net >