I'm developing with VB.NET 2008.
One of my host was crashed, so I take the files and keep development on another host. But now something strange is happening:All frames, lines and shapes are disappeared on design-time, but are seen normally in runtime.
Please see the attached screenshot (Upper is design-time, lower is runtime).
http://gomidjets.com/forms.JPG
How do I fix this?
Update:
The shapes are GroupBox and LineShape. LineShape is part of "VisualBasic PowerPack" indeed.
If I try to add a line shape, it is added but invisible in the designer, while it's visible during the run-time.
Any idea?
If i was you i'd most definitely check the zorder.
As a last resort take the controls out of the groupbox and recreate the groupbox.
Also if you add a groupbox or a lineshape control on another form,does it work? if they do,you should check your code
Related
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.
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.
I am using visual studio 2013. So far I have a tablelayoutpanel in the Form1.vb[design], I dragged a Textbox(control) from the Toolbox, but I could not move the textbox within the tablelayoutpanel. What happenes here? How could I get around with it? Any hint will be appreciated.
I also faced the same problem when I was experimenting with TableLayoutPanel.
I couldn't figure out any change in code that might have resulted in this strange behavior but found a way around. Restart Visual Studio! :P
This actually helped and I could move my controls anywhere in the TableLayoutPanel.
In the properties change Anchor to "None".
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!
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