.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

No response to function/shortcut keys in modeless form

1 REPLY 1
Reply
Message 1 of 2
Anonymous
220 Views, 1 Reply

No response to function/shortcut keys in modeless form

I have written a VB.Net application using VS2005 and ACAD 2007. Some commands open modeless forms which have main menus which contain shortcut keys (e.g., Cntl-O = File | Open).

When the form is open and active and I press Cntl-O, nothing happens.

I have tried to open using frm.Show and ShowModelessDialog, with same result. If that form is opened as a modal dialog, it works as expected, and oddly enough, the modeless works when in debug mode (e.g., run debugger in VS2005 which starts up ACAD), the problem doesn't occur, even for modeless forms.

Has anyone experienced this? I REALLY need the function keys to work in my modeless forms!!!

Thanks in advance.

P.S., I could provide sample code, but it is easy to reproduce using a sample form.


UPDATE!!!!!

I figured it out by myself! You must use the CommandFlags.Session attribute on the routine to get the shortcuts to work. Hope this helps someone.
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Anonymous

interesting, I had the same thing happen on my modeless form. I'll try that.

chriswilson <>
|>I have written a VB.Net application using VS2005 and ACAD 2007. Some commands open modeless forms which have main menus which contain shortcut keys (e.g., Cntl-O = File | Open).
|>
|>When the form is open and active and I press Cntl-O, nothing happens.
|>
|>I have tried to open using frm.Show and ShowModelessDialog, with same result. If that form is opened as a modal dialog, it works as expected, and oddly enough, the modeless works when in debug mode (e.g., run debugger in VS2005 which starts up ACAD), the problem doesn't occur, even for modeless forms.
|>
|>Has anyone experienced this? I REALLY need the function keys to work in my modeless forms!!!
|>
|>Thanks in advance.
|>
|>P.S., I could provide sample code, but it is easy to reproduce using a sample form.
|>
|>
|>UPDATE!!!!!
|>
|>I figured it out by myself! You must use the CommandFlags.Session attribute on the routine to get the shortcuts to work. Hope this helps someone.
James Maeding
Civil Engineer and Programmer
jmaeding - at - hunsaker - dotcom

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost