Flickering Task Bar on Full Screen Windows Mobile 6 Apps - vb.net

Just finishing off an update to an application written in VB.NET that used to run fine under CE.NET 4.2. Deployment platform is now Windows Mobile 6.1.
The application runs in full screen, however whenever a new form is opened, the task bar, i.e. the bar with the start button comes to the fore and then the new form takes over. This is particularly annoying as I have a form that has many sub forms which are 128,128 and still the task bar flashes and obscures part of the user input screen.
Has anyone comes across this? Any known workarounds?

You can use the technique I posted here to disable the task bar.

I assume your application flow is something like:
Form 1 open.
Form 1 close.
Form 2 open.
The problem is that between the Form 1 closing and the Form 2 opening the background window may be partially drawn (e.g. the task bar will draw).
To work around this we normally create a parent window (which is your case is full-screen window) which sits behind the form windows. That way when one is closing and the next is opening it falls back to displaying the parent window which can display anything you like (blank?).

Related

How to keep MS Access Forms only in the MS Access Window/Canvas?

I have created my MS Access Program but I have multiple monitors and so do the other people who will be using the program.
Just so you know my forms are popup style, have no borders or record selectors and I am guessing this is where my issue comes in.
I would like to know if there is a way to ensure that when a user opens a form, the form will only open within the MS Access Window/Canvas on the active monitor?
I would also like to know if there is a way for my application to automatically adjust according to the users screen resolution?
As an example my Forms open perfectly when I am using the application on my main screen which has a resolution of 3840 x 2160 but if I open the application on my second screen which has a resolution of 1920 x 1080 the forms that open subsequently, such as the user form, then opens on the main screen so small that no one can read or see it.
Application is on Right monitor and User Form is Open on Left (Main) Monitor
The code I have used for the OnOpen Event is below:
Private Sub Form_Open(Cancel As Integer)
Dim Right As Integer, Down As Integer
Right = Screen.ActiveForm.WindowLeft
Down = Screen.ActiveForm.WindowTop
DoCmd.MoveSize Right, Down
End Sub
This was obtained from some research but I cant seem to bind everything to the Application Window/Canvas.
Thank you.
Well, if you only ever have one window open at one time, then you can do this with ease.
Remember, today most applications are SPA (what we call single page applications). We don't use (nor have) very often a main applcation window, and THEN a child window. For one, they tend to not be touch friendly, and it is VERY hard to move a window around with touch.
but, even desktop browsers even use some "kind" of tabbed interface. And so do most desktop applications. And by tabbed - I don't necessary mean across the top. This access screen shows a tab system from the left side:
So, Access now has a option to use tabbed interface.
And if you :
do NOT use pop windows.
Set access to use tabbed interface, eg this:
Then un-check the display tabs.
If you do above, then you WILL NEVER EVER see the access background window.
You see this:
However, keep this in mind:
The form you launch will re-size to the main size of the Access window - not the other way around.
All forms can't be popup
You are "SPA" like applcation.
So, most accounting and most desktop applications now work this way. And WHEN you launch a form, the window does not re-size tot he form, but remains the current applcation window size.
So, without ANY specials code, you can 100% hide the access background window.
And if you re-size the access application window, then the form will re-size to fill out the current form.
This might look quite bad in some cases - such as this:
Now for above, I on purpose made the form background green - just to PROVE and show that that Access background window NEVER will display with above options.
So, the main issue here?
You can 100% hide the access background window. And you can now do this WITHOUT specials code. Just a few settings.
On startup, you can hide the ribbon - or build a custom one - again your choice.
But, your forms MUST NOT be popup forms anymore.
So, hiding the access background window is very easy - it then becomes a question of form size - size forms re-size to application window size - not the other way around.
On the other hand, if you adopt a tabbed interface (accross the top or left side), then your main window is always in display, and you are in effect swapping out the form (a sub form) for display of that given form. You can write your own code, or use a new navigation form - which does this for you).
If you need to launch separate windows, then you could launch them as popup from this main form - but that main form will of course always hide the access background if you follow above.
If you wish to hide the ribbon, then on your main form - load event, you can add this code:
DoCmd.ShowToolbar "Ribbon", acToolbarNo
So, your main form (which hides access background) could be tabbed inteface (SPA) or it could be a launcher form, and each option clicked on could launch a form as popup - which can be dragged anywhere on your computer - including to the 2nd monitor if you wish.
So, either forms stay always in the main applcation window - but never see the background. Or you use above, and launch forms as popup.

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?

vb.net - Multiple dialog forms push Main form behind other apps

We have a VB.Net Application with a Main form that should always be visible. However, we want to be able to display a succession of two dialog windows where we can close the first dialog as the second one appears. However, when doing that, the Main form gets sent behind whatever other applications are open and does not re-appear until the second dialog window closes.
We can correct this issue by keeping the first dialog window open behind the second one, but it’s not ideal. What are we doing incorrectly?
Try using dialog1.owner = mainform

vb.net - how to keep my main app in focus on desktop?

I have an application that is created using windows forms in VB. In my application, I have a button that opens up another (child) form. When that (child) form is closed, my other form (main app form) takes the focus, the only problem is that if I have other applications open on my desktop, when my child form closes, the main parent form goes to the back of my desktop for a second and then comes back to the top. So basically when you close the child form, even if the main form is on top of all of the other apps on the desktop, it will be thrown to the back momentarily and another app will be shown and then my VB app will come back to the top. It lasts for about one second and then comes back on its own, I don't have to do anything to bring it back to the top. It is very annoying. Is there any way to prevent this?
Thanks.
Yes. Set the topmost property of the form to true e.g. Form1.TopMost = True. In the closing function of the childforms, set this property of your main form. As the form closes the main form should set this property to false and then use Form/Me.Focus or Form/Me.BringToFront command if you like.

VB.NET forms keep disappearing while system is in use

We have a "Core" system that we use to run the business and there are about 15-18 people using it at any one time. The program is written in VB.NET and has about 165 forms.
The way it works is when the user runs the program he/she is prompted to log in and if the login is successful a "Main" form is displayed with a number of menus (Customers, Suppliers...). From there they can click on the menus which open another form on top of the "Main" (the "Main" form needs to be visible in the background because it displays information that is relevant to the users while they are in other screens)
The issue we are having is that if the users have other programs open while using the "Core" system (Outlook, Word, Chrome, anything really) and switch to another program and then back to the system, it only displays the "Main" form and any other forms open on top disappear. The way we get around this is by switching back to the other programs they have open and clicking on the minimise button in the top right corner of the window until all the other programs are minimised, which only leaves the "Core" system visible. However this is becoming a nuisance to all the users (including myself and the other developer) and we really need to sort this issue out in order to keep out staff happy :)
I would appreciate any advice or pointers in the right direction which will help us solve this issue and please feel free to ask if you need any more information.
It seems you are creating the ChildForm from the MainForm but the ChildForm itself is showing itself with Me.ShowDialog(). What you should probably try is showing the form from the MainForm and passing the MainForm in as the parent. This should keep the form tied to it's parent and on top. For example:
childForm.showDialog(Me)
Where Me is the MainForm. This is the documentation for that method.
This is the important part:
Owner Type: System.Windows.Forms.IWin32Window
Any object that implements IWin32Window that represents the top-level window that will own the modal dialog box.
Does that make sense?
Changing code to show dialog will change behavior of your code little bit, like your main from execution will hold till you close child form
But you can you use only show as child (not dialog)
childForm.show (Me)
This will not change anything except whenever you click on main form it will display its entire children on it.