How to add hidden controls to a form (not programmatically)? - vb.net

I used a custom "skin" or w/e you may call it for uniquely designed forms in Visual Studio, to be accurate for VB.NET.
I decided to remove the custom form and the problem is that all controls are now hidden, but they still exist within the project.
Is there any way to make them visible in designer again, so I can add them to my new form.

Check to Location of the missing controls , maybe it's outside bounds.

Related

Is there a way to hide all panels in windows forms using vb.net?

i was wondering if it was possible to hide everything at once in windows forms, i was planning to use a drop down which made things appear and disappear but i wanted everything hidden at the beginning for simplicity.
Thanks!
On the form, add a Panel control (found in the Containers section of the toolbox).
Set the Visible value of the Panel to be False.
Add all controls inside this panel. You can then make the panel visible and hidden via code. (no need to cycle through all controls on the form)

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.

vb.net 2008 express: Two textboxes in a custom control

I'm making a custom control in VB.net 2008 Express. Without getting into the details, I am able to duplicate the issue as follows:
Make a blank custom control. Stick two textboxes on it. Don't add any code.
Run it and click the second textbox. (Don't click the first.) The text cursor appears of course.
Now Type... Although the text cursor moves within the second textbox, the text you type appears in the first textbox, not the second one.
I have found that this issue depends on the tab order of the controls. Whichever textbox is first in the tab order gets text typed in the other.
I have also found that if you press [Tab] to set focus on either textbox, the problem goes away.
QUESTIONS:
1) Is this a known bug in .net? (Specifically 2008 Express)
2) Will this phenomenon carry over when the custom control is brought into a larger project?
I followed the steps above and was able to reproduce it when I started with a Windows Form Control Library and ran it inside the UserControl TestContainer. I test this in Visual Studio 2008 Professional.
However, when I placed the user control inside a form in a separate Windows Forms Application project, the issue did not occur. So I'd think it's safe to say that this won't be an issue when the user control is used in another project.

Datagrid View in a custom control

I am trying to add datagridview control in my custom control but i failed.
I started creating new project[windows custom control library], added datagridview control on it and also added a property naming "DGVMain" which refers to datagridview control.
I compiled it.
While testing i find its properties like visible and other working but when i click on columns property it doesn't work. i.e i cannot add/edit columns into the datagridview of my custom control.
Did i miss any steps or do i need to add some more actions?
As you don't have other control within your custom control, maybe an inherited user control would be more appropriate in this case and I'm sure it will also fix your problem.

Edit form in desginer that is generated at load time

Hi
Just inherited a VB forms application that must be modified. My problem is that the controls are placed at the form at the load event. There is no controls on the form when I open the form1.vb in Solution explorer.
How can I achieve changing the design for the form?
/Andy.l
You'll have to locate the code that creates and adds controls (I guess you found it in the Load event) and modify that code. Or else comment that code out and add all the same controls in the designer.
If the controls are not dynamic (i.e. if the Load event always adds the same controls in the same positions), then your best long-term solution is my second suggestion (add all the controls "properly" in the designer).