Retrieve Visibility Of Design Controls On The Win Form - c#

I have design winform with various controls on it like textbox/ComboBox and Panels on some days ago but now if I am trying to run the forms the forms is visible but the controls which are designed on it is not visible. I don’t know what is the reason or some mistake made by me in past with it. But the reality is that I am unable to retrieve the controls on the forms.
Form11.cs (code design ) file is available as well as form11Designer.cs file is also there in well coded format.
Don’t know where is the mistake and how to retrieve all the controls which I have designed on it?

Have a look at this post: Winforms usercontrol phenomenon : suddenly all items are away!

In the Visual Studio form designer, open the "Properties" view. At the top of it, there will be a drop-down list box of all the controls on the form. You should be able to find and select your control from that box. When a control is selected from that list box, it is also 'selected' in the form designer itself, so should get the selection rectangle around it. Your control might just be hiding behind another control...

Related

Navigating between parental panels

I have problems with editing panels in C# windows forms(Visual studio 2008). I placed some panels into another, and now I have problems with navigating panels inside parental containers. Is there any tool that gives not only drag-drop control, but also tree view of container and panels in it. For example, like Navigator window in NetBeans(IDE for Java). Any help?
I'm not sure about VS2008, but newer versions have Document Outline Window (View > Other Windows > Document Outline)
To not get lost in controls, consider to name them properly. Then you can find them in the list of Properties window.
Instead of label1 use labelInputName, located on panel1, which you also rename to panelInput. This gives parent/child feeling and you will never lost.
If you get lost, use Document Outline window to see tree-like relation via Controls property (who is control of who). This window is a helper (help to find and select control), you will still have to use designer to do changes.
Another important thing is UI design. Whenever you get cluttered or bulky feeling, than it's the time to change something.
Making UserControl for repeatable part is one way.
Another is to differ design and run time (what you see in designer): to example, if you have several panels, which has to be shown at same place, then you can use dynamic container for them (FlowLayoutPanel, TableLayoutPanel) or you can have them placed in a way for you to easily see them in design-time, but their position will be corrected during run-time (to example, in the constructor). Prioritizing designing is a must if you are going to support project and edit functionality in next versions.
p.s.: talking about winforms, but all said should be true for wpf as well.

I can't click on Telerik controls in my WinForms application in Visual Studio

I’m having an issue w/ a WinForms app I built several months ago. I opened it yesterday for the first time in a few months, and I’m unable to click on any of the controls in the form (in Designer view). If I double-click any of the controls on the page, it opens up code for the Load event of the form, as if I double-clicked the form itself; it’s as if the form is on top of all other controls maybe? All of the controls on the form are Telerik controls. I've been working on this project in VS 2010 since its inception. I also tried opening it in VS 2012 this morning, but that didn't help.
If I drag a new Telerik control to the form, it vanishes instantly, as if it’s buried under all of the other controls. If I drag a non-Telerik control to the form (such as a standard textbox), it appears fine, and that control will respond to clicks (ie – the Properties window will populate w/ properties for that control).
After I noticed this issue yesterday, I reluctantly upgraded my Telerik WinForms controls to Q3 this morning, but that hasn’t helped anything.
For now, I was able to bypass the Designer view altogether, and I made changes via the Designer code class. However, I’ll be in trouble if I ever need to actually add a new Telerik control to this form. Any help is appreciated.
This seems like a missing design time assembly. Please have a look at the following articles for explanation and suggestions how to handle this: link link

C# custom GUI, better implementation?

I'm making a custom GUI for my application. Basically my application has multiple 'tabs'. Each tab has a panel control binded to it, to display tabs contents. Whenever any of the tabs are clicked, appropriate panel control becomes visible (that displays contents) and the rest of the panels become invisible.
The problem is that when I design them in Visual Studio, it's hard to work, ether panels are stacked up on each other or I put them in different coordinates, and when panel becomes active, it's location is updated.
Is there I way I could design all the panels, like on separate 'form' or something like the same way I have separate classes? if that makes sense. Thanks!
EDIT:
I can't use the standard tab control, because my application has custom GUI, all buttons and everything is designed in image processing app. Tab control doesn't allow me to use my own graphics.
I'm going to take a look at UserControl, thanks everybody!
You can create each tab content in a separate UserControl. Use that each UserControl as the only content on each tab.
You should be able to design each "panel" as a separate UserControl.
Your main Form can just be composed from those UserControls, instead of having the entire UI built into one class.
First I would suggest you stick with the standard .NET controls in most cases. Particularly in this case the standard TabControl seems to be a good fit.
That said, you can place all the panels on the form in their final location (being sure not to place a panel within the other panel). You can then use the drop down in the Properties dialog to select the Panel you wish to work with. Next go to the Format menu and choose Order->Bring to Front. This will bring the wanted panel to the front so you may use the designer on it. You can then continue to hide or show the appropriate panels at runtime.

How to change controls on a Windows form without changing the form itself

What I am trying to remember is the name of a windows form control which allows with an ID change allows programmer to move between its states, which are different panels with different controls on them. There is a control that does exactly this - but I can't remember its name at all. Do you know anything similar to this in C#?
edit: basically, I have a windows form. It has a panel. I want to, by changing panel's a specific property, I want to switch between its states, every state containing another set of windows form controls. I cannot, however, remember the name of this control. Any ideas? Sorry if my first wording is confusing.
It sounds like you mean something like a wizard? In asp.net webforms has a wizard control buy afaik the closest in windows forms is TabControl. But no matter; it is trivial to simply hide and show some Panel controls. It can be trickier to use the designer, of course - but you can lay them out next to each other and move then at runtime as needed.
Looks like there are a few wizards available for WinForms too
https://stackoverflow.com/questions/195255/best-wizard-control-for-net-windows-forms
http://www.codeproject.com/KB/cs/WizardDemo.aspx
And, well, plenty of others

C#: Move Controls From Form to tabPage in VS Form Designer

I decided to change a utility I'm working on to use a tabpage. When I tried to drag various controls from the form to a tab page on top of the form, it made copies of the control, giving it a different name. It's easy enough to just remake the form on top of the tab or just edit the source code in the designer to have everything be added to the tab instead (and this is what I did, which worked), but it seems like there would probably be a better way to do this via the gui.
The correct tool for this is the Document Outline (CTRL+W, U). Simply drag your set of controls in the outline so that they are under the tab page. Voila.
The document outline dramatically simplifies these types of operations, especially when you are dealing with complex layouts.
Have you tried cut and paste. That usually works for me.
Your control key is stuck. Do not press control key when dragging controls.
I drag controls from form control to tab page controls all the time no problem. Answer #1 is totally correct.
You can use the Document Outline window and move the controls to the tab page one by one by dragging tree nodes.
The hardest problem is retaining control locations on the tab page.

Categories

Resources