windows-forms-designer

File corrupted?

Hi All, I have a form, MainForm, which was working just fine and dandy until earlier this morning. I made some code modifications to a different form and when I went to run the application, I received an error in MainForm (error is irrelevant). I went into MainForm to see what the problem was and was horrified at what I saw... ALL MY ...

Visual Studio Form Editor: How do I add title text-style mouseover to a button?

I have a System.Windows.Forms.Button control, and I want to add a hover-text explanation of what the button will do. I were writing a webapp, the answer to my question would be approximately this easy: <input type="button" title="This is the answer" /> I'm using Visual Studio 2008 Express. I've checked all the properties I could find ...

Filtering Listboxes in a Windows Forms application

Is it possible to filter the contents of a Listbox in a Windows Forms application? The DataSource of my ListBox is a BindingSource containing a bunch of DTOs in an: IList<DisplayDTO> I want to filter on the DTO property that is specified in the ListBox's DisplayMember. The text to be filtered on is provided in a separate Text Box. ...

How to pick semi-transparent colors during Design-time in VS?

After a quick subclassing of Windows.Forms.Label and then noticing that the default Label is able to use semi-transparent background colors just fine, I wonder whether there is actually a way to pick them in Visual Studio. The Color picker in the property Grid allows me to pick custom, Web and System colors but doesn't allow me to define...

What is a System.Windows.Forms.Design.ToolStripAdornerWindowService+ToolStripAdornerWindow?

I saw this come up in the Properties window after adding and then deleting a ContextMenuStrip. What is it and what does it do? Screenshot: ...

How to recognize code generated by Visual Studio's GUI designer?

Visual Studio is kind enough to generate a lot of code for us when we create and design Windows.Forms controls. It also surrounds most of it with a #region statement. In newer versions it also uses a partial class to separate generated from manually created code. Developers are supposed to edit code only in certain areas. But nothing p...

Detecting Mouse Click on an Array of Controls

I'm adding an array of Panel objects (which in turn contain other items) to a form at runtime. Then, I'm assigning a click event to each panel inside a loop like so: pnlInstrument[index].Click += pnlInstrument_Click; The empty click function looks like this: private void pnlInstrument_Click(object sender, EventArgs e) { } The even...

Visual Studio Designer: problem with custom component selection change

I have a component derived from IComponent (also tried to derive from Component) The problem: If I have 2 my custom components on the form, and one of them is selected, then I can't straightly select another my component, I have to click on something else first. Changing selection between my component and any another component (for exa...

C#.NET - Can I change which class the designer adds events to?

I have my own custom control derived from System.Windows.Forms.TreeView which is present on the designer toolbox. I add an instance of this custom control to my form (using the designer). The purpose I created an inherited control is that I want to let the control itself handle its events since it's supposed to act as a View in a stand...

How to temporarily disable Visual studio auto generated events?

All, I have finished the GUI design phase... Now I've started to add meaningful names to all the controls in my application. Visual Studio is driving me nuts auto generating the events each time I click on the control to change its name (ok so it only happens when I mess up and double click... but still annoying). Is there a way to te...

Why isn't there a Windows.Forms like program for C++ (is there?)

I don't think there is any program like VS Windows.Forms for C++. Now I know that "Windows.Forms" are in themselves a C# "thing", but it eludes me why no one has put together a similar graphical construction interface for C++ Windows GUIs. Am I just not aware of it/them? Should I try to make one (that'd be a challenge, for me anyway, bu...

Is it possible to get your user control to display those alignment guides when placing them on a WinForm?

In Visual Studio (2008) when you place a textbox on a Windows Form, and drag it around, you see very helpful guidelines which help you align it (left, right, top or bottom) to other controls. You also see a line the represents the bottom of the text in that control helping you align the text within your textbox, to the text within a labe...

Windows Forms Designer destroys form layout

This morning I stumbled over a weird issue in Visual Studio's Windows Forms designer. I have a form which worked for about a month now without changes. It looks like this in the application: (text made unreadable because I'm not entirely sure of the legal implications here). Now starting today, apparently (I think I had the form open...

VS2008 WinForms Designer: 'Could not load file or assembly' upon startup

I have a WinForms application that references one of my DLLs Mvc.dll via a file reference. The main application form uses a user control SimpleWizard that in turn uses a user control called SimpleWizardList, which in turn references Mvc.dll in its constructor. When starting VS2008, the designer complains Could not load file or assembly...

Complex class declaration confusing forms designer?

I have a class declared as: public class Foo<T> : Panel where T : Control, IFooNode , new() { ... } I added it by hand to test it, but I will eventually need something that can be displayed in the Forms designer. The Forms designer doesn't like this, it says: Could not find type 'FooTestNameSpace.Foo'. Please make sure that the ...

Is creating an inheritance chain of WinForms going to bite me?

Suppose I have a base form Main1 which may need to be altered slightly, including perhaps adding additional Controls and altering the size/location of existing Controls. Those base Controls which I need to alter I set to 'protected' in the designer. So I have another form, Main2, that derives from Main1. Then I have another form, Main...

Custom Property value not shown during runtime for usercontrol

I am creating DBCombo with a property called DBColumnsCols of type SYColumns. SYColumns is a custom class type. SYColumns has three properties whcih are the sub properties for DBColumnsCols. The property is using UITypeEditor for configuring the columns. The three sub properties are populated properly from UITypeEditor form. But when try...

How can I get VS2008 winforms designer to render a Form that implements an abstract base class

Hi, I engadged a problem with inherited Controls in WinForms, 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 the list. There was no problem with it, but I know found out, that it would be right, ...

Attribute for accessing custom properties in Forms Designer

I have a control that has a list of Rods. The Rods have a few public properties: public class Rod { float Angle { get; set; } Color MainColour { get; set; } int Length { get; set; } int Width { get; set; } //other private code here you need not be concerned with ;) } In the control that hosts t...

Allow multi-line String properties in the Properties window

I've got a Windows Form User Control with a string property for setting the text of a textbox. This string can be multi-line. I've noticed that on some controls with a text property, , and instead of being forced to type in the single line property textbox, you get a little pop up where you can type multiple lines. (As a matter of fac...