PC Review


Reply
Thread Tools Rate Thread

Catch KeyDown when menu open

 
 
jrad
Guest
Posts: n/a
 
      12th Aug 2009
Is there a way for the open form in my CF application to catch keydown
events when a menu is open?

My breakpoint in OnKeyDown() does not get hit when I press a key and I
have already set the KeyPreview property to true for my form.

Thanks,
JR
 
Reply With Quote
 
 
 
 
Amit
Guest
Posts: n/a
 
      22nd Aug 2009
On Aug 12, 7:01*pm, jrad <joe.radjavi...@gmail.com> wrote:
> Is there a way for the open form in my CF application to catch keydown
> events when a menu is open?
>
> My breakpoint in OnKeyDown() does not get hit when I press a key and I
> have already set the KeyPreview property to true for my form.
>
> Thanks,
> JR


Hi JR,

I dont think so you will get any Key event in the form when your Menu
is active.
But i guess you can handle the Menu related events to do your
oprations insead of KeyDown.

Regards,
Amit R
 
Reply With Quote
 
Ziddan
Guest
Posts: n/a
 
      25th Aug 2009
On Aug 12, 7:01*pm, jrad <joe.radjavi...@gmail.com> wrote:
> Is there a way for the open form in my CF application to catch keydown
> events when a menu is open?
>
> My breakpoint in OnKeyDown() does not get hit when I press a key and I
> have already set the KeyPreview property to true for my form.
>
> Thanks,
> JR


You can get Event while menu is open ( use you custom mainMenu in
place of Default i.e work similer )

//Create Custom sub-menu
MenuItem mn = new MenuItem();
//register the event handler
mn.Click += new EventHandler(handleSoftKeyAction);
//Add custom sub-menu in Main Menu
this.Menu.MenuItems.Add(mn);

I hope this will help you out...

Vinod Bhatia
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cant catch KeyDown event Jørgen Sørensen Microsoft Dot NET 3 17th Nov 2009 12:41 PM
Cant catch KeyDown event Jørgen Sørensen Microsoft VB .NET 0 11th Nov 2009 07:21 AM
How to catch event KeyDown,KeyUp and KeyPress Tony Johansson Microsoft C# .NET 2 29th Jul 2008 02:35 PM
ListView Cannot catch keydown Event in vs.net 2005 beta2? Liren Zhao Microsoft Dot NET Compact Framework 0 21st Jun 2005 03:16 PM
Can not catch KeyDown message from RETURN key Roman Muntyanu Microsoft C# .NET 4 13th Jul 2004 07:23 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:01 PM.