Where can I find old .vb form width and height? - vb.net

I have some old vb.net forms (can't find out which version they were using when they made them), and I can't find the form's Width and Height in any of the files.
The forms don't have a .designer.vb file, and it's not in the .vb "Windows Form Designer generated code" section either. However, when I open the form in the design view, I can see the values perfectly in the Properties tab.
I've tried making a file search for the values independently but there are nowhere to be found.
Any suggestions or ideas?
I have googled for some time but I can't find anything that helps.

After some tests, I'm quite sure the value comes from the sizes of everything else it has inside.
The form has various Group controls that "force" the Form's size, and therefore, there's no need to stablish it manually. If I do so, the values appear as usual, but otherwise, they are not stored anywhere.

Related

Display controls in Designer VB.Net 2013

I have a set of controls which are added dynamically to a panel. The number of controls depends on which tab a user selects from TabPage control, which is embedded in a form.
At the moment, the controls don't appear in Designer, but appear during execution.
I managed to display controls for other forms which are not dynamic by moving the non-design code to the vb file, but how can I display the other ones?
The only answer that I know of is to add your code in the .Designer.vb file of the Form.
BUT! I strongly advise you to avoid that if you are not sure how it works! Custom code in the .Designer. files can break your form design and project with possible random crashes.
Also, your code can be changed and removed by the Visual Studio designer:
Custom code in designer.vb file goes away when making edits in design mode
Instead, you can make the panels into custom user controls and add those to the tabs.

ActiveX controls changing to pictures (Excel/VBA)

My company creates workbooks for clients that contain ActiveX controls (in most cases we need the extra functionality as compared to Form Controls). When we create them, they work fine on our end, but when we zip them up and send them to our clients, they open the WB and the ActiveX controls are no longer ActiveX controls, if you right click it, it behaves like a picture.
I feel like this is due to the MS ActiveX debacle. I have had them run the Fix It and making sure all the MS Office components were closed, and had them reboot, but still nothing.
I am pulling out my hair, and have asked on other forums if anyone else has had this issue, and what they have done to fix it. Thanks in advance.
Could you please check in client system whether macros and active x controls are enabled in Trust center setting?
https://support.office.microsoft.com/en-us/article/Enable-or-disable-macros-in-Office-documents-7b4fdd2e-174f-47e2-9611-9efe4f860b12?CorrelationId=fe6a4d24-f4d9-4c6b-afa0-40d2828ad22e&ui=en-US&rs=en-US&ad=US
use above link if needed.
Try closing excel and deleting the .EXD files from your computer.
Source: http://www.mrexcel.com/forum/excel-questions/296750-command-button-turned-into-image.html
While saving the Excel document, save it as "Macro enabled workbook".xlsm
In my case, the worksheet prompts a non responsive error sometimes. When I reopen it, Excel repairs it and turns all active X check boxes (sometimes drop down list and command buttons) into images. It happened many times and I had to spend a lot of my time recreating them and liking to cells.
I experienced a similar problem when Excel repaired a file; this may be similar to what's happening with the Zipped file. FormControl Buttons don't appear to have the same problems but I see you want to keep the additional functionality of the ActiveX Control.
You may be able to make use of the code I created by inserting one Form Control button that runs the Sub RepairMissingButtons() that your clients can press to restore the images to CommandButtons. This currently fixes buttons for any selected sheets, so you'd want to first identify which sheets need to be selected (or add a form control button on each sheet that needs the repair done).
You'd need to modify the Sub CreateButton() to meet your needs (currently requires hard-coding the Caption, BackColor and any other ActiveX properties that may have been lost by the button being converted to an image):
Reverse Excel ActiveX command buttons erroneously converted to images after corrupted file repair
Having this problem, activex controls sometimes change to pictures.
Many places around the internet the answer is: Use form controls, well as far as I can tell form controls don't actually do anything useful.
Even Microsoft's support site says, recommend using form controls, how can that be the answer. being able to interact with VBA is as far as I can tell the only reason to use Microsoft applications instead of free ones.

Can't View VBA Form

So I created a form, and have been using it for a while.
All of a sudden today it stopped working. Other forms load and can be viewed but not this one.
The weirdest part is that the controls still respond!
So I can't actually see the form but I can still interact with it. (only using keyboard no mouse clicks are responding) I know the form is enabled. But I simply can't see it! I have restarted excel, and the whole computer.
I even completely removed all code in the userform to see if I could get the blank shell to load, and while I can tell it loads (it disables everything in excel until I use Alt+F4) it still won't be visible. I have checked the Enabled, All Colors, Captiuon, Width, Height, Top, Left, StartUpPostion, SpecialEffect, Zoom, DrawBuffer properties and everything is fine.
I have also Exported and reimported it and still simply nothing. Also tried importing it into another Workbook, nothing. I at my wits end (not that it's very far to reach!)
Also, I can still see the userform in the designer I can still edit it, I get NO errors. This happens not only when calling the form in code, but even when running it right from the designer.
Any one ever have this issue? Any ideas or solutions?
The issue ended up being the Top and left properties. While I did check them, they way I checked them was not accurate; I still have no idea why, but I think it defiantly has something to do with dual monitor setup.
The way I tested double checked the forms top and left properties was by creating a new form and adding a button on the button click event I had a msgbox show the top and left properties of the form at time of clicking.
I then moved the new form to where I wanted the form that woudn't show to be and clicked the button; I then set these values to the form that wouldn't show.
I tested this location and made sure to match the properties with the values I wanted multiple times and it didn't work.
For some reason the values needed where about 1000 digits off (instead of 250 I needed to use 1250) even though I had set the form right where I wanted the new one to be and made sure to save the properties when they matched what I wanted

Visual Studio Form Designer changes layout of controls on open

I have a user control that looks like this in the designer:
However, when I close the designer and open it again, it looks like this:
The eight controls that have moved are text boxes and labels that are all set to Anchor Top, Right while all the other controls have different anchoring.
Does anyone have any idea what is causing this change of layout, and more importantly, how it can be prevented?
I also had the problem of changing the layout of my form every time by opening it in design mode.
The problem was the use of the tool "TableLayoutPanel".
By coincidence I found that changing the property "Dock" solved the problem.
Just set to another value and then undo this.
After this is seems to be solved. Don't ask me why!

fix form size in visual studio

I am trying to design a web form in visual basic and i have a problem.I put all the elements(buttons, labels etc) in the place i want.When i run the form i have the option to maximize the screen of the form and when i do this,a blank space appears in the form where there are no elements and all my elements are shown to the left upper side of the form. I can't see that blank space when i am designing the form. Could you help me how to fix the fix the size?
I tried autosize,autoscroll and size properties but i didn't fix the problem.
You don't specify whether it's VB6 or VB.Net but for once, it doesn't matter much.
Look at the form property BorderStyle, and change it to one of the "fixed" options.
VB6 documentation
VB.Net documentation