External References to Form Elements & Menu Shortcuts

  • From: "Donald Marang" <donald.marang@xxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Sat, 27 Mar 2010 09:15:24 -0400

Thanks everybody for the many tips!  My program has come a long way due to your 
help.  

For now I think I will just distribute the executable, a Desktop Shortcut Icon, 
and some documentation files in a zip file.  The user would need to place the 
files at, "C:\QuickOCR" folder and copy the Desktop Shortcut Icon to the 
Desktop.  If they want to install elsewhere, they would need to change the path 
in the Desktop Shortcut Icon.  

I have two small areas where I still have some questions.  

I split out most of the large chunks of code, like the OCR processing, into 
subroutines in modules stored in separate files.  This works well, makes it 
easier to update, and would make it simple to add functionality in the future.  
One such addition would be adding other OCR Engines.  However, since it is not 
within the main form object code, I have had to supply the entire object 
heirachy in the references to controls, such as dcQuickOCRForm.tcFilename.Text. 
 I looked at the Imports, Namespace, and With Visual Basic commands.  I started 
playing around a little with these, but decided to first make the subroutines 
work.  Could someone enlighten me to which command would be appropriate, or 
what modifier on the main form object should be changed in this situation? 

The other thing that started confuddling me at 2 AM last night was that JAWS 
refuses to announce the shortcuts in the menus.  I added the code to the File 
and Actions menus yesterday.  That was another reason I wanted most of the 
code, like "Perform OCR" as subroutines.  There are visible shortcuts in the 
menus and they work if you know the shortcut key combinations, like Control + O 
for Open image.  I have set the shortcut properties; 
ShortcutDisplayText="Ctrl+O", ShortcutKeys="Ctrl+O", and ShowShortcutKeys=True, 
of the menu items in the property tables for the menu items.  I have tried both 
"Ctrl+O" (contracted spelling) and "Control+O" (all characters) in the 
ShortcutDisplayText property.  Things are displayed on the screen as expected 
and function properly, but JAWS refuses to announce the shortcuts.  JAWS is 
announceing menu shortcuts in all other applications, including Visual Studio 
Express.  What do I need to do to force JAWS to recognize and announce the 
shortcuts?  

Don Marang

Other related posts: