Tab Key not working in modeless form displayed by add-in

By Xiaodong Liang

Issue

I have an add-in that displays a modeless form. I have some text boxes on this form. The tab should cause the focus to switch between the controls on the form. Instead the Tab key has no effect.

Solution

Enter, ESC and CANCEL do not work in modeless dialog is as designed, since your dialog is child of Inventor MainFrame window. The message pump in this case is owned by Inventor. Therefore, all the keystroke messages are taken by the Inventor application and not dispatched to the modeless dialog box. You can workaround this by implementing windows hook WH_GETMESSAGE for modeless dialog. Please refer to following Microsoft KB article.

http://support.microsoft.com/kb/233263

Or, display the form as a modal dialog using ShowDialog() instead of Show(). 


Comments

One response to “Tab Key not working in modeless form displayed by add-in”

  1. ESC and CANCEL do not work in modeless dialog is as designed

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading