windows-forms-designer

WinForm designer error open designer

我们两清 提交于 2019-12-10 10:27:34
问题 I work on VS 2010 .net 4.0 , my app had winForm with many controls. sometime i occur very starnge designer error: Could not find type 'Namespace.TypeName'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built. The variable 'ControlName' is either undeclared or was never assigned. i click Ignore and Continue the control disappear from my form. if i look in designer.cs

Visual Studio 2017 - can't find Visual C++ Windows Forms

被刻印的时光 ゝ 提交于 2019-12-10 02:52:25
问题 So, I'm in awkward situation - I wanted to create Windows Form App using Visual Studio, but I can't find any place to create Visual C++ Windows Form template. I tried even to reinstall Visual C++, add other libraries and search answer online - no results. I can of course create new Winforms in C#: But not in C++: Also, all possible modules in Visual Studio Update was checked: I tried even add template from Online list: What should I do next? I use Visual Studio 2017 Community Edition. 回答1: Ok

Adding a user control using Windows Form designer

白昼怎懂夜的黑 提交于 2019-12-10 01:21:29
问题 This is probably an incredibly obvious question, but I just can't figure it out. I have a Windows Form managed by the form designer. I'd like to include a custom user control, also managed by the form designer. But I'm unable to get the custom control to show up in the Toolbox, even if I try manually adding it under the "Choose Items..." dialog. Both form and control are in the same assembly. I've tried separating the control into a separate assembly in order to follow the instructions here

UserControl does not auto resize with the Form

断了今生、忘了曾经 提交于 2019-12-09 19:25:48
问题 I am having troubles with setting my user control to automatically resize with the panel where it is created. When user is resizing a main form that contains the user control, the size of this user control does not change at all making for some poor user experience. So far I tried following: Ensure MinimumSize and MaximumSize properties on the user control are set to 0. Set AutoSize property on both (1) the user control and (2) the panel where it resides to True Set Anchor property on the

Align controls to the center of a form in Windows Forms designer

本秂侑毒 提交于 2019-12-08 19:32:15
问题 This is something that's been driving me up the wall: how can I get the Windows Forms designer to provide pixel snapping for the horizontal and vertical centers of the form I'm working on? 回答1: Visual Studio provides a number of tools to assist in aligning groups and sizing groups of controls in a form. These features are accessed using the layout toolbar. To display the layout toolbar right click on any part of the standard Visual Studio Toolbar and select Layout from the drop down menu. The

Is there a list of controls placed on the current form in Visual Studio 2005?

我只是一个虾纸丫 提交于 2019-12-08 14:45:01
问题 Simple situation, really. Using the form designer in VS2005, I placed a label on my form, and then deleted it's text. Now there's no way I can find to select the label. I assume it wasn't deleted; where can I find it? 回答1: View --> Other Windows --> Document Outline 回答2: If you look in the properties window there should be a dropdown of all the controls on the form. You can select a control you can see and then you should see that control in the dropdown list. Then open the list and find the

How to make Winform scrollable in C#

喜你入骨 提交于 2019-12-08 09:25:31
问题 I have create (I am using Visual Studio 2012) winform that have this proprities: Width: 812 Height: 667 FormBorderStyle: Fixed 3D In right side of put vScrollBar (that have height: 599px, which is exactly the size in my fixed form). Now I whant that my form height would be heigher then 667px, and with help of scrollbar, you scroll to bottom of form. Let me put it in picture: Now I whant to create If you scroll with scroll bar textboxs and etc. moves down, so you can see textboxes that are at

Drag and Drop Function with Drawing Rectangle C# .net - Forms

余生长醉 提交于 2019-12-08 06:40:54
问题 I want to drag and drop that I have drawn on the forms. Here is my code for drawing the rectangle. An this works fine. Rectangle rec = new Rectangle(0, 0, 0, 0); public Form1() { InitializeComponent(); this.DoubleBuffered = true; } protected override void OnPaint(PaintEventArgs e) { e.Graphics.FillRectangle(Brushes.Aquamarine, rec); } protected override void OnMouseDown(MouseEventArgs e) { if (e.Button == MouseButtons.Left) { rec = new Rectangle(e.X, e.Y, 0, 0); Invalidate(); } } protected

Unable to use Visual Studio project on different computer

一世执手 提交于 2019-12-08 05:38:39
问题 I was working on a project (winforms, C++/Cli) on my desktop. When I copy project files to use it in my laptop, designer do not open. References to the 3rd party library[MetroFramework] is properly linked (project compile & run fine, no build error) but if I open designer I receive the following error C++ CodeDom parser error: Line:99,Column:27 --unknown type".please make sure that the assembly that contains this type is referenced. if this is a part of your development project, make sure

Changing an extended RichTextBox text in constructor doesn't work

我的未来我决定 提交于 2019-12-08 01:38:42
问题 I have the following class: public partial class RichTextBoxEx : RichTextBox { public RichTextBoxEx() { InitializeComponent(); Text = "Some Text"; } } However, when I place it over a form and run the program, the RichTextBox is empty. What is the problem and how can I fix it? I assume there is something basic I'm missing here, but I cannot figure out what, and I did not manage to find any information about this. 回答1: The property values which you set in constructor of the control are usually