WinForms ShowInTaskbar=False vs Tabbing between applications - vb.net

I have a WinForms application (VB.Net), where I have set ShowInTaskbar=False for all forms except the main form. This is because all other forms are dialog windows of some sort, and I did not want them to show up separately in the task bar.
What I see now is that when no dialog is open in my application and I use Alt+Tab keys to tab between currently open applications, I don't see a tile for my application. I do see a tile when there is a dialog open. This is very counter-intuitive to me.
As I said earlier, ShowInTaskbar property is true for my main form. What else is required? Thanks for your help!

After further research, I found that my problem was being caused due to having the form border as FixedToolWindow and ShowInTaskbar=False on the dialog windows. I changed the form border to FixedDialog, and set MaximizeButton=False, MinimizeButton=False. That fixed the issue.

Related

Textbox cursor focus is not happening sporadically in UWP application

We have UWP application which has more than 200 pages and Have Templated Control for TextBox which is extended the TextBox control. We have customized most of the controls, Textbox, ComboBox, RadioButton, etc..
We are getting an issue sometimes as The cursor is not visible, but able to type, also not able to capture the Control GotFocus event as well.
The UWP application is running in KIOSK mode (using shell Launcher V2).
When we got know this issue and trying to remote the system and verifying it, the cursor focus is working good.
The application has lock concept, when the system is idle for an hour, the software (UI UWP application) got locked automatically. The Lock window is a dialog. So far it was occurred 5 to 6 times, most of the time issue happened after we unlock the application.
(We have created custom dialog control (container) which is as part shell page elements and display the pages as dialog, here we were facing one issue, the tab focus is going background when the dialogs are open, since the parent element is in the shell level, so that we are disabling the background controls when any dialog opens and enabling the background controls when the dialogs are closed. We have more suspicious in this area. But sometime it happen when navigate one page another page as well.)
Also we have Global event to launch the keyboard whenever the TextBox control focused, FocusManager.GotFocus+=.. (but we didn't see any exception in this event method)
Any suggestion?

How to determine which form controls the keyboard input on VB.net

I'm developing a VB.net windows application and I have some issues with the keyboard input.
My application has different forms and I'm showing and hidding them with the user interaction. One of the inputs comes from the keyboard, and here is where I have a problem.
When I hide a form and show the next one, most of the times the new-shown form does not receive the keyboard input until I click somewhere on it.
I assume that the problem is that the new form I'm showing is not the "selected application" for windows until the user interacts with it by clicking on it, but I don't know how to set this "property" by code.
I tried with focus and select on the whole form (Me.select/focus) and in some form's control (me.lbl_xxx.select/focus), but I did not get any result.
Can anyone explain me how to control which application/form gets the keyboard input on windows?
Thanks
David
You can't really interact with a label so the input focus won't be set properly.
Focussing a specific textbox on your form on the other hand should just work fine.

Treeview control (comctl32 / VB5-era) missing icons & captions?

VB6 app works fine on Windows 8 with one exception:
Display form with treeview. Displays correctly.
Click button which displays another form used for entry.
When the new form is dismissed (and a new node added to the treeview) all nodes' pictures and are invisible. The +/- signs display, but not the pictures and captions.
If the form is closed and then re-opened, all nodes are properly displayed until another form is opened.
The two forms involved are both MDI child forms.
Thanks.
I just ran into this problem on a client machine. Unfortunately I didn't have the luxury of rebuilding using VB6 (mscomctl.ocx) controls, which according to the previous comment should work.
However it turns out that if you disable the "Touchscreen keyboard and handwriting panel" service in Windows 8 the comctl32.ocx TreeView control will work properly.
IIRC from prior experience, while the treeview in COMCTL32 (from VB5) has this issue, updating the program to use the VB6-era MSCOMCTL32 treeview should fix it. I don't think we ever found any other fix for the root problem, assuming you can't disable the touch services.
I believe the two treeviews are very similar and this upgrade shouldn't be difficult.
I don't recall if any other common controls had the same issue.

How to tell when the DevExpress FindPanel is closed?

I am currently programming in Visual Studio 2010 within VB.NET and am using DevExpress v10.2.
I just started programming with the WinForms XtraGrid FindPanel and so far it works wonders. However I was wondering if there is any way to know when the user closes the FindPanel. Right now if gridview.OptionsFind.AllowFindPanel is True and gridview.OptionsFind.AlwaysVisible is False then the user is able to click on the x and close the FindPanel. Is there anyway to catch this closing? I don't want to stop it just do a couple of things once it is hidden or closed.
Thanks
Apparently DevExpress Gridcontrol doesn't have a separate event for whether the FindPanel is hidden or shown. Instead I used the GridView's Layout event and inside checked if the FindPanel was visible or not with: gridView.IsFindPanelVisible

How to get my VB.net form to focus above existing users windows and applications?

I have a Visual Basic .Net form (launches after the splash screen tests database connectivity) and it is not focusing above other existing windows on launch.
How do I get it to focus above all existing windows and Windows Explorer windows?
Form.Topmost = true;
See the corresponding MSDN.
A topmost form is a form that overlaps
all the other (non-topmost) forms even
if it is not the active or foreground
form. Topmost forms are always
displayed at the highest point in the
z-order of the windows on the desktop.
You can use this property to create a
form that is always displayed in your
application, such as a Find and
Replace tool window.