How can I prevent form from randomly resizing during use? - vba

I'm working with a status form that should look like Image 1, and initially does, but during runtime, it resizes to Image 2.
In my code I do not act upon any Length, Width or zoom levels for the form or for it's controls. I do change the borders and font initially, but that is not when the resize triggers.
I tried to run the code step by step to see exactly what triggers it, but the form does not resize when I run it like this.
This did not happened for previous versions of the file, and I didn't do any changes to the form, so I'm lost to what is going on.
I tried setting the same zoom level for both my screens, setting the zoom level for the form to 90 and back to 100, restarting my computer. After this it still resizes.
I do have a normal screen and an ultrawide one, but I've always had them, and never had any issues.
Importing the forms from an older version of the file Fixed the issue.
Can anyone give me any advice on how I can prevent this from happening?
Image 1
Image 2

Related

Make Form Maximized, but not Full Screen

I would like to make my Form1 Maximized, but not Full Screen, as differentiated by Maximized taking the entirety of the screen while leaving space dedicated to the Taskbar at the bottom. To clarify, I'd like my application to work how other applications traditionally work, such as Chrome or the MS Office suite when maximized. Definitely nothing fancy.
To make my application resize itself dynamically, I've calculated where buttons will fit relative to the height and width of the application. However, I discovered quickly that my application, in Maximized state, actually continued underneath the task bar (or, in reverse, the taskbar is entirely cut off by the application - it is Full Screen). My bottom-most buttons are actually cut off by the taskbar. After experimenting with different Form settings, I discovered this appears to be entirely the result of WindowState = FormWindowState.Maximized setting.
I've tried various routes to counteract this behavior. First, I attempted to resize the maximum bounds programmatically, while leaving the Form's MaximumSize set to "0,0" (the default "resize me as needed" setting). I have this code in the Form_Load event:
Me.MaximizedBounds = Screen.PrimaryScreen.WorkingArea
and
Me.MaximizedBounds = Screen.FromHandle(Me.Handle).WorkingArea
However, these did not have any affect, even though the working area height is confirmed smaller than the form height. In fact, upon further testing, I have not been able to programmatically change the maximizedbounds at all, apart from manually in the form properties, setting the MaximumSize to 100,100. Does anyone have suggestions here?
I also tried to change the WindowsState = FormWindowState.Manual and readjust the form height this way:
Width = Screen.PrimaryScreen.WorkingArea.Width
Height = Screen.PrimaryScreen.WorkingArea.Height
Which makes the form closer to the dedicated dimensions, but makes the window movable and no longer covers the entirety of a traditionally maximized screen (it leaves about 20 pixels padding on all sides).
In the end, I'm at a bit of a loss on how to do this and would really appreciate some clarification. I have attempted other code I'd be glad to share, as well as similar questions on the forum, but none have helped me get my targeted behavior. I have a locked Taskbar on the most recent update to Windows 10, if those details make any difference.

'Pause' Display while control elements are updated (VB.Net)

So, I am kind of asking a question for a hypothetical situation here.
I am producing a Windows Form App made to show multiple windows of data on the screen at the same time. To accomplish this, I have decided to put a Table Layout Panel in the main form to act as a container for all of the data windows I will open.
The width and height of each cell of the Table Layout Panel will change depending on how many windows are open. For example, if just one window is open, it takes up 100% of the width and height of the container area. Alternatively if 3 windows are open, all the windows will have a size equal to 50% of the container's width and height.
Now let's assume each of these Windows have 20 different control elements, which are all used to help the user search through the data shown in each window. Additionally, all of these elements dynamically resize and relocate themselves as the dimensions of the window they are in change.
With all of these moving elements, when a screen is added or removed it can be assumed that there will be a good deal of glitching going on on the screen that may alarm the user. Thus we get to my question.
Is there a way to 'pause' the display of a Windows Form Application so that the user doesn't see everything on change modifying itself? I can't seem to find anything like while looking online so that is why I am asking here.

Anchor settings not working

My VB.Net application is using anchoring to force certain controls to resize to their container, eg a list box on a form. This is all pretty standard and easy to do. However having just released the application into production I've found that on one user's computer the anchoring seems to just be ignored. She has Windows 7, as do I.
So far example what should look like this:
instead looks like this
I asked her to try a higher resolution on her screen but that didn't to help.
On one of them I was able to fix it by manually setting the width and height in form load properties of the control instead of anchoring it, but it seems a bit backward.
It looks to me like the form has been resized to be too small for the anchoring to work correctly. Set the .MinimumSize property of the form to ensure the form does not get too small for your layout.
Older staff sometimes reduce the screen dpi to make text easier to read, which means the screen may not be big enough to display the form. To fix this, set the screen dpi back to something reasonable and increase the text size for readability.
Turned out to be that the display issues were caused by user having the "Font Size" setting on her computer set to 200%. To be honest I didn't even know you could do that.

Virtual basic Full screen resizing

I'm making a full screen application in visual basic and is having some issues with full screen and control resizing.
I've looked around both google, stack overflow and youtube for answers but none seems to be working for me. What I have worked my way to is that i need to use anchor or docking or something like that if I am not all incorrect
Edit:
Picture examples:
The main window in my editor.
When the program runs in maximized screen
Resolution of the program is 800x600 as its going to be made for a screen with that resolution.
You probably want to use anchor points. You can anchor a control to any side, all sides, or any combinations of sides in its container (the form, usually). When the form is resized, the control is automatically sized accordingly. You can also use the form's resize event and change the size or location of the controls manually when the form size changes.

UIWebview rotation+transform issues

When a user presses a button i add a scale transform to make it zoom out like safari's tabbing. when user presses the webview it comes back up. When the view is rotated, i use to get the values of how i wanted the frame to look like in tab mode, and checked if it was in tab mode when rotating and applied the frame. it works, and ive tried taking it out. The issue is, if i rotate like 10 times, a black line on the right side gets bigger and bigger going inside the webview. i have logged tons of objects for the web view and its scrollview to see if anything is off, the scrollinset/offset is correct, the frame is correct, the transform is correct too. i cant figure out why theres the black line. i tried refreshing the webview to see if its the webpage, and it doesnt fix that ether,the scale transform values is
CGAffineTransformMakeScale(0.6, 0.68)
for zoom out, and 1, 1 for zoom in. if anyone wants to see the effect just apply that to a uiwebview and start rotating the device about 10 times and you would then really see it.
heres how the web view looks when rotating a bunch of times:
on the right side theres that thick black line, it gets bigger with every rotate but ONLY grows when that transform is added, if its normal size again it stops but stays there.
When you transform any view, their frames do change, If you are using autoresize flag, check it since transforming changes frames and autoresizing also changes frames and this creates weird result.