Tab stop not working in form with custom controls - controls

I am creating a vb.net program in visual studio 2019 community. I have created a form with several buttons and group boxes. Within the group boxes are radio buttons and or Check boxes. The form also uses 2 custom controls. 4 instances of Custom control "A" is on the form at design time. Two instances of Custom control "B" are added at runtime and more can be added by the user with a button click. Note that custom control "B" has within it 4 instances of custom control "A".
The problem is when I run the program and press the tab key I do not get the expected behavior of focus moving to the next control. Nothing happens when tab is pressed. Pressing the tab key does nothing regardless of which control I give focus to.
I have set tab stop to true on all the controls I want to stop on. I have set the tab index values in the order I want.
Thinking maybe it has something to do with the custom controls...
I tried removing the code that adds custom control "B" at runtime so that no custom control "B" is on the form. That did not help.
In addition to removing control B I disabled all Custom control A. That did not help either.
Is there a setting somewhere that enables the tab button to work as expected?
What else should I be looking at?

Ok so this appears to be unrelated to the form. I failed to mention this is an add in for another program (Autodesk Inventor). I also failed to consider that inventor may be handling the tab key, which appears to be the case...
https://adndevblog.typepad.com/manufacturing/2012/05/handling-tab-key-in-inventor-net-forms.html

Related

How to disable the navigation keys on Inno Setup installer GUI?

Is there a way to completely disable the navigation hotkeys on the installers created by Inno Setup?
Currently pressing B is like like clicking on the BACK button, and pressing N will get you to the NEXT page. I would like to disable this behaviour, so the installer is not reacting to these keys, and maybe other navigation keys which are there.
I'm adding a component search ability on the components page. These hotkeys were breaking it. As if someone is searching for a name that is containing either N or B, it was switching the page, totally ruining the functionality I added there.
First this is a bad idea. The keyboard accelerators are useful and they are absolutely needed for example by blind users.
If the accelerators break your search functionality, then you have implemented it incorrectly. Have you noticed that if you type the hotkeys on input boxes, the keys correctly type into the box and don't trigger the buttons? You seem to have an XY problem.
Anyway...
The keyboard accelerators are controlled by adding the & symbol in control caption before the letter, that should work as the accelerator. In the GUI the letter is then underlined (after you click the Alt key).
For example, this is how the buttons are defined in the Default.isl:
ButtonBack=< &Back
ButtonNext=&Next >
ButtonInstall=&Install
Just remove the &, if you do not want them. Either modify the Default.isl or override the caption in the [Messages] section in your .iss.
Related questions:
How to add access key to button in Inno Setup
Why do we use '&' character in Inno Setup?

Skip A Dialog In Visual Studio Setup Project

I've created a Visual Studio Setup Project (VS 2010) in which one dialog (4 textboxes) is optional. It depends upon a checkbox selection by user in previous dialog. Is there any way I can skip the optional dialog ?
There are no capabilities in Visual Studio setups to do this. VS setups are going away anyway after VS 2010, so you should choose an MSI-building tool that has this capability.
You could in principle use Orca to manually change the MSI tables, such as the ControlEvent table, but it will be virtually impossible unless you already know how the MSI internals work.
I haven't found out a way to skip a dialog depending upon a control(e.g. checkbox or radiobuttongroup) selection by user in previous dialog;
but you can create a custom dialog(ref link1, ref link2) with all required control(s), and then toggle the visibility of the control(s) with "Show/Hide" Action with proper condition statement(e.g. then checkbox or radio buttongroup selection by user in previous dialog), then you can still make it just like skipping a dialog.
Here is my example:
The previous dialog control selected value(already set to be either "Foo" or "Bar") is passed through "SELTYPE".
When SELTYPE="Foo", I will show controls named "CustomControlFoo" and "RadioButtonGroup", and also hide the control named "BodyText";
When SELTYPE="Bar", I will hide controls named "CustomControlFoo" and "RadioButtonGroup", and also show the control named "BodyText".
For more information, please read this Micorosoft's official reference:
ControlCondition Table
The action that is to be taken on the control. The possible actions are shown in the following table.
Table 2
Value Meaning
Default Set control as the default.
Disable Disable the control.
Enable Enable the control.
Hide Hide the control.
Show Display the control.

Data Driven Coded UI Testing in Visual Studio

I am curious about an issue in Coded UI Testing. For example I created a button named Button1. I did assertions and everything is fine. Then I changed this button's name to Button2. Now, do I have to write my assertions again or is Coded UI Test can suit in every different name change. Notice that I am not doing any input or parameter changes, I am just changing user interface. Thanks for your replies.
You should be able to change the test code easily to cope with a name change like that. Open the UI Map file in the UI Map editor; ie double-click on the uimap.uitest file in solution explorer. In the left hand pane expand the method and select the action that clicks the button. That should open the relevant control in the right hand pane. Alternatively just find the control for the button in the right pane. View the properties of the button and click on the ellipsis of the "(collection)" value of SearchProperties or the FilterProperties. One of the items shown should be the old name of the button, just rename it there.

Main menu in a FoxPro 9 app

If you use the Visual FoxPro 9 Application Framework to create a desktop standalone application and add a database and form, the exported exe shows a Quick Start on load which shows the form to select.
If one wants to show up his own MAIN MENU form on the exe load, what's the way to do it? Using Set Main on the Menu Form does not work.
Here is a visual representation of the idea.
In its simplest steps then, aside from the "Wizards" you can use to build forms and bind to data environments, tables, grids, etc maybe this will help.
Create an empty project.
CREATE PROJECT MyApp
Go to the documents tab and add a new form. Put a few buttons as you've described on it. One of the buttons, allow to close the form, such as "Exit". Double click this exit button and put in the code
CLEAR EVENTS
THISFORM.RELEASE()
Since there are no "data entry" elements on this form, we need something to make it keep focus. Buttons alone don't just "do" that. Go to the properties sheet of the form and go down to "Window Type" and set it to "Modal" - meaning, keep this form up until its intentionally closed. (This also keeps as a baseline for you calling any OTHER forms from this one for your application.) Save the form, such as "MyMainForm".
Click on the "Code" tab of the project and do a new "Program". In its simplest context, put in
DO FORM MyMainForm
READ EVENTS
Save the program, such as MyStartupProgram. Once saved in the project, right-click on this program and select "Set Main" for this to be considered the single entry point to your entire application. Save, build the project and run it. You should be good to go.

tab order in dialog box

I'm using an old version of Visual Studio that provides only the 'interactive' method for setting tab stops. Is there anyway to clear all the tab stops before setting them? Or anyway to exclude a given control from having a tab stop?
Added 10-sept-2009
Part of my problem was confusing tab stop order and tab stops. I naively assumed setting tab stop order, set a tab stop hence much confusion. Thanks for pointing out that tab stops are set in the property box.
You are not clear about your specific VS version, but as far as I remember (back to VC6) you automatically assign the tab order if you simply click once on each control in your desired order. There is usually no need to reset them beforehand.
This hint from a VC6 tutorial might be helpful:
To adjust the tab order of your
controls, you can choose the Tab Order
command from the Layout menu and click
the controls in the order that you
want them to be tabbed. If you have a
complicated dialog box and only want
to change the tab order of a few
controls, you can take a little
shortcut by holding the Ctrl key down
and selecting the last control that
tabs properly before selecting the
controls that tab incorrectly.
Clicking an empty spot in the dialog
box, or pressing Enter, will exit the
tab order mode.
To prevent a control from being
reached using the Tab key, clear the
Tab stop checkbox on the control's
property page.
If you want to change the tab behaviour programmatically, look for the WS_TABSTOP windows style.
Open the dialog whose tab order you want to change. Press Ctrl + D. On the dialog you will see numbers next to each control which indicate the tab order for that control. Click the controls in the order you want the tab order to go.

Resources