windows-forms-designer

Visual studio 2019 windows forms designer

核能气质少年 提交于 2020-01-04 02:36:08
问题 I'm having a problem with the windows form application . When I create the windows form application , it displays the source code for the form but not the designer layout 回答1: To enable the designer, download and install the Windows Forms .NET Core Designer VSIX package. See article: https://devblogs.microsoft.com/dotnet/introducing-net-core-windows-forms-designer-preview-1/ 来源: https://stackoverflow.com/questions/58380472/visual-studio-2019-windows-forms-designer

Error inside of Application.Designer.vb inside of OnCreateMainForm() Sub

微笑、不失礼 提交于 2020-01-03 17:25:33
问题 I can't figure out what the issue is here. I started project from scratch, went to debug, and received error: System.InvalidOperationException was unhandled Message=An error occurred creating the form. See Exception.InnerException for details. The error is: Object reference not set to an instance of an object. I am not understand why this error is occurring in an auto-generated file. Here is the code in it's entirety: '--------------------------------------------------------------------------

How to resize controls inside groupbox without overlapping?

女生的网名这么多〃 提交于 2020-01-03 05:10:09
问题 Consider I have a simple group box with two textboxes When I expand the window I want to resize the my label and textbox. So I used the Anchor property, but it is getting overlapped. Textbox1 is overlapping with textbox2. How can I maintain the size increase based on form size without overlapping 回答1: You can achieve what you want like this: Add a TableLayoutPanel with 4 columns and place it inside your GroupBox. Place the Labels inside columns 1/3 and Textboxes inside columns 2/4 Set

Display a MultilineStringEditor at design-time to edit the lines of an edit-control?

痞子三分冷 提交于 2020-01-02 06:53:08
问题 I'm following this C# article to learn how to create an ActionList and Action Items, however the article is only focused to action items of type DesignerActionPropertyItem ... I would like to create an item of type DesignerActionMethodItem to call a method that must open a MultilineStringEditor to edit the text lines of the control, just the same action item that we can see in a default RichTextBox control: Someone could explain me how to do this in C# or VB.NET?. I'm stuck on the values to

How to get WinForms custom control's default value to be respected when first dropped on a form

余生长醉 提交于 2020-01-01 19:30:02
问题 I have a class library with a custom control in it: using System.ComponentModel; using System.Windows.Forms; namespace ClassLibrary1 { public sealed class CustomLabel : Label { [DefaultValue(false), Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public override bool AutoSize { get => base.AutoSize; set => base.AutoSize = value; } public CustomLabel() { AutoSize = false; } } } Notice that AutoSize is set

Visual Studio Designer is always trying to change my control

谁都会走 提交于 2019-12-31 13:44:18
问题 I have a somewhat complex UserControl, and Visual Studio 2008 is giving me a rather harmless annoyance when working with it. Every single time I open the control with the Designer, it decides to immediately change some of the harmless values set by the designer - namely the initialization of Size properties. If I save those changes, close, and reopen, it almost invariably ends up deciding another component of my control needs its initial size changed, ad infinitum. Luckily these changes are

Select id record view by Report viewer

倖福魔咒の 提交于 2019-12-31 05:09:12
问题 When i enter the id on the textbox of form1.form2 Report viewer shown the record.but it won't displayed all data diplayed what is in the table. I have create the dataset1 and load the values. Form1 Form2 frm2 = new Form2(); frm2.studentid = textBox1.Text; frm2.Show(); Form2 string id = studentid; this.recordsTableAdapter.FillBy(this.DataSet1.records, id); // by **this line Gereate sub for by** i am a beginner of Report viewer this.recordsTableAdapter.Fill(this.DataSet1.records); this

How can I link a component's Size to the Window size?

陌路散爱 提交于 2019-12-31 03:54:11
问题 I am making a simple WinForms program. I would like to link a component's size to the size of the Window. Let's say the user enlarges or shrinks the Window by dragging it's borders: I would like that a component gets bigger when the Window does and vice versa. Let's pretend that we have two Buttons, in the center of the Window, side by side: I want to make them the same size filling the entire width of the Window. How can I do that? 回答1: Sample procedure, using a TableLayoutPanel and 2

Custom Color Palette in Visual Studio Color Property Editor

≯℡__Kan透↙ 提交于 2019-12-30 06:18:28
问题 Within the Visual Studio Designer, under the properties window you are able to select the ForeColor , BackColor etc using color picker. When you want to pick a color, a color picker comes up with the tabs 'Custom, Web, System'. If you select custom, then you are able to add a new color to the picker, but only the bottom 2 rows are changeable, and the changes don't persist across controls. So if you add a color to the palette, when you select another control and want to change for example

Embed a form onto a tabcontrol in windows forms

自古美人都是妖i 提交于 2019-12-28 22:07:07
问题 I have a tab control in a windows form and I want to be able to click on a tab and in the body area of the tab I want it to display another form as an embedded component. Is this possible? If so, can someone please provide an example or a link to an example of how to accomplish this? 回答1: You are probably looking for Tabbed MDI Child Forms 回答2: You can embed a Form but it's not the best choice. Better place the contents on UserControls and add that to the TabPage. 回答3: Set your MainForm