Results 1 to 6 of 6

Thread: [RESOLVED] Default button on Form

  1. #1

    Thread Starter
    Lively Member okosv's Avatar
    Join Date
    Sep 2006
    Posts
    95

    Resolved [RESOLVED] Default button on Form

    Hello All.
    I'm working on some project for Windows Mobile (Pocket PC 2003).
    And, i can't find AcceptButton property for Form object.
    Does anybody know, how can I set default button property for Form in VB.NET project for Windows Mobile.
    And also CancelButton.
    Thanks a lot!

    P.S. Sorry for my english. And without KeyPreview property, only with standard methods.

  2. #2
    Frenzied Member MaximilianMayrhofer's Avatar
    Join Date
    Aug 2007
    Location
    IM IN YR LOOP
    Posts
    2,001

    Re: Default button on Form

    You need to use WndProc to capture window messages, then if the message corresponds to the 'enter' button, use

    Code:
    MyDefaultButton.PerformClick()

  3. #3
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Default button on Form

    Hey,

    Not everything that exists in Windows Form Applications exists for Windows Mobile applications. So you have to work around certain things. This looks like one of those times.

    The concept of AcceptButton doesn't really make sense for Windows Mobile Applications, as the user will either be using a touchscreen input, or stylus, in which case the flow is a lot different.

    You might choose is instance to use the menu control and use one of the hardware keys the default action for the form.

    Hope this helps!!

    Gary

  4. #4

    Thread Starter
    Lively Member okosv's Avatar
    Join Date
    Sep 2006
    Posts
    95

    Re: Default button on Form

    Great thanks! You are right!

  5. #5
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Default button on Form

    Hey,

    Glad you got it working.

    Remember to mark your thread as resolved if your question has been answered.

    Gary

  6. #6

    Thread Starter
    Lively Member okosv's Avatar
    Join Date
    Sep 2006
    Posts
    95

    Re: Default button on Form

    ok, thanks that was recalled.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width