Questions tagged [windows-forms-designer]

Use this tag for questions specific to design-time support. For questions which are not specific to design-time support use WinForms tag.

The Windows Forms Designer is a graphical editor for Windows Forms controls within Visual Studio. The Windows Forms Designer allows to add controls to a form, arrange them, change properties, write code for their events and provides a visual preview.

2487 questions
117
votes
5 answers

Transitioning from Windows Forms to WPF

For a long time now, I have been stuck with Windows Forms development (started with VB6, and has continued through to C# .NET 4.5), and I have pretty much hit the limit of what Windows Forms can do, both using pure .NET, and special effects with…
Matthew Layton
  • 39,871
  • 52
  • 185
  • 313
104
votes
10 answers

How can I get Visual Studio 2008 Windows Forms designer to render a Form that implements an abstract base class?

I engaged a problem with inherited Controls in Windows Forms and need some advice on it. I do use a base class for items in a List (selfmade GUI list made of a panel) and some inherited controls that are for each type of data that could be added to…
Oliver Friedrich
  • 9,018
  • 9
  • 42
  • 48
53
votes
22 answers

Windows Form Designer: Could not load file or assembly

Has anyone ever had the issue where trying to "View Designer" on a windows form in Visual Studio .NET causes the error: "Could not load file or assembly…" ? In this case, the assembly in question was XYZ.dll. I managed to fix this by adding XYZ.dll…
Chien Chern Khor
48
votes
16 answers

The variable 'variable_name' is either undeclared or was never assigned

I have a question related to the error on the title. Im working with c# and Visual Studio 2010. I have a form declared as "public class FormularioGeneral : Form", which is the base for the rest of the forms in my application. When i try to access…
Kitinz
  • 1,522
  • 3
  • 17
  • 28
39
votes
3 answers

Generic base class for WinForm UserControl

I created a generic base class for a WinForm UserControl: public partial class BaseUserControl : UserControl { public virtual void MyMethod() { // some base stuff here } } And a UserControl based on that: public partial…
Filini
  • 2,109
  • 2
  • 22
  • 32
39
votes
2 answers

Zooming in the visual studio form designer

I'm using the Visual Studio 2013 form designer to edit a form. The size of the form in the designer window is too big so I want to zoom out. In applications like Photoshop or Blend I could (among other things) use the keyboard shortcut Ctrl-0 to…
dumbledad
  • 16,305
  • 23
  • 120
  • 273
38
votes
5 answers

Reportviewer tool missing in visual studio 2017 RC

I just started to write reporting software in new version of visual studio named visual studio 2017 RC but just noticed that core reportviewing tools is missing from both windows forms and WPF application template. Can anyone tell me why the…
Omar Sharif
  • 545
  • 1
  • 6
  • 17
37
votes
6 answers

Disable designer in Visual Studio?

I'm using Visual C# Express to write Windows Form applications, and call me old school, but I don't like the designer. It is a nuisance and pollutes my project with lots of unwanted files, as well as unwanted monkey-generated source code. Please…
I. J. Kennedy
  • 24,725
  • 16
  • 62
  • 87
35
votes
5 answers

Baseline snaplines in custom Winforms controls

I have a custom user control with a textbox on it and I'd like to expose the baseline (of the text in the textbox) snapline outside of the custom control. I know that you create a designer (inherited from ControlDesigner) and override SnapLines to…
Mike
  • 1,445
  • 1
  • 11
  • 14
35
votes
2 answers

How to avoid error "Constructor on type 'MyType' not found" when inheriting a base class

I have a Visual Studio 2010 Windows Forms app which includes a Form base class that other classes will inherit. The base class' constructor takes a parameter that the child classes will pass to the base class. Example: public partial class BaseForm…
Jed
  • 10,649
  • 19
  • 81
  • 125
32
votes
2 answers

Visual Studio 2010: Projectitem unavailable

When trying to design a form in Visual Studio 2010: How do i tell Visual Studio to ignore whatever's causing the problem and continue? Research the problem showed two possible solutions: Merideth was able to click "Ignore and Continue". (i have…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
27
votes
2 answers

Combining multiple Attributes to a single Attribute - Merge Attributes

On a control I am using multiple attribute properties: [Browsable(false)] [Bindable(false)] [EditorBrowsable(EditorBrowsableState.Never)] [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] [Obsolete("", true)] public new…
Thomas
  • 677
  • 1
  • 5
  • 19
25
votes
3 answers

Why can't I alter the height of a TextBox control in the windows forms design view?

I have a new project. I drop a textbox control on it. I open up the properties window, and I can change the height and hit enter or click out of the box and it will update the designer, but when I try to change the height it resets back to the…
awright18
  • 2,255
  • 2
  • 23
  • 22
25
votes
8 answers

How to resolve VS2010 Windows Form Designer issue (base class could not be loaded)

I have recently been getting an error in the Windows Forms designer of VS2010SP1 when using inherited UserControls. The error is The designer could not be shown for this file because none of the classes within it can be designed. The designer…
Anthony
  • 2,240
  • 4
  • 20
  • 24
24
votes
5 answers

How do I get which radio button is checked from a groupbox?

I have these groupboxes: I want to run some code according to checked true state of a radio button like: string chk = radiobutton.nme; // Name of radio button whose checked is true switch(chk) { case "Option1": // Some code …
Amit Bisht
  • 4,870
  • 14
  • 54
  • 83
1
2 3
99 100