windows-forms-designer

how to display the content of a structure in a listbox in a c# windows form application

跟風遠走 提交于 2019-12-24 01:14:25
问题 Dunno if I'm going the right way about this? The contents of the structure below is defined elsewhere. when I run the code it is just outputting a list of 4 zeros. any help would be greatly appreciated..... public class NativeMethods { public struct FT_DEVICE_LIST_INFO_NODE { public uint ID; public uint LocId; public string SerialNumber; public string Description; } [DllImportAttribute(@"C:\Users\Brendan\Documents\libMPSSE.dll", EntryPoint = "SPI_GetNumChannels")] public static extern uint

Visual Studio changes designer generated code when I create a new class inheriting from Form

天涯浪子 提交于 2019-12-23 23:27:59
问题 As per recommendation I ask this question in a new thread. The question stems off an answer by Reza given to this question, where I wanted custom properties to show up in the form's designer. To accomplish this, I need to create a class, let's call it BaseForm and let BaseForm inherit from System.Windows.Forms.Form and I should add my desired properties to this class and let my user form inherit from BaseForm . Like this: public partial class BaseForm : Form { [Browsable(true), Description(

VS 2010 updates Designer.cs when no changes are made

拈花ヽ惹草 提交于 2019-12-23 22:30:16
问题 VS 2010 seems to be updating my form's designer.cs file when I open the form in designer view. For example, say I have a form with a label of type System.Windows.Forms.Label and I had created the label such that the designer file has (auto generated code) this.myLabel.AutoSize = true; this.myLabel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.myLabel.Location = new System.Drawing.Point(**25, 63**); this

How to make combo box auto expand on mouse hover and close when the mouse leaves combo box in c#? [duplicate]

筅森魡賤 提交于 2019-12-22 18:36:11
问题 This question already has answers here : Winforms: how to open combobox properly? (5 answers) Closed 5 years ago . I have a windows form. In that windows form i have a combo box. I have predefined items in the combo box as Add, Remove and Delete. I want to make the combo box auto expand on mouse hover. How can I do that? I noticed that auto expand code should be given in the mouse hover event of combo box. like this private void comboBox1_MouseHover(object sender, EventArgs e) { } but I don't

WinForms Designer and TableLayoutPanel SmartTag Customization

风格不统一 提交于 2019-12-22 13:09:11
问题 I am trying to customize the existing Smart Tag content for a TableLayoutPanel Windows Forms control for use in the Windows Forms designer (I implemented a designer that leverages the WinForms designer features exposed by the System.ComponentModel.Design and System.Windows.Forms.Design namespaces). Whatever approach is offered as a solution, it's got to also work when my control is added to the Visual Studio toolbox and when my control is placed on a WinForm surface in design mode while in

WinForms Designer and TableLayoutPanel SmartTag Customization

痞子三分冷 提交于 2019-12-22 13:08:20
问题 I am trying to customize the existing Smart Tag content for a TableLayoutPanel Windows Forms control for use in the Windows Forms designer (I implemented a designer that leverages the WinForms designer features exposed by the System.ComponentModel.Design and System.Windows.Forms.Design namespaces). Whatever approach is offered as a solution, it's got to also work when my control is added to the Visual Studio toolbox and when my control is placed on a WinForm surface in design mode while in

Virtual Keyboard (Swype like Keyboard) Windows Forms Application C#

可紊 提交于 2019-12-22 11:12:29
问题 I am trying to create a swype like keyboard in Windows Forms using c# I have two problems: a. I am not able to reproduce the finger swipe action. b. I am not able to recognize the letters under different keys. For the first problem: I used the Graphics Class and the Pen class and used it like this : bool draw; Graphics g; Pen p; int prevX; int prevY; private void Form1_Load(object sender, EventArgs e) { draw = false; g = CreateGraphics(); p = new Pen(Color.Black, 2); } private void Form1

Seeking a Winforms System.ComponentModel.Design Design Surface BeginDrag/EndDrag Event Hook

不想你离开。 提交于 2019-12-21 20:22:08
问题 I am using C#, Winforms, VS 2017 Enterprise, and the full .NET Framework 4.7.2. [TLDR section at end!] I have been working extensively with the System.ComponentModel.Design namespace to create working Visual Studio-like Winforms designer. Setting up the environment for such an end-user forms designer requires deep understanding of objects and interfaces in the aforementioned namespace (and how to wire-up them all) along with toolbox and property grid components. Therefore, it's not possible

Windows Forms designer is permanently broken for a certain form

谁说胖子不能爱 提交于 2019-12-21 17:43:07
问题 This is a follow-up to All controls on a form are invisible, now that I know a little more about it. I have a certain form that was created with the Windows Forms designer of Visual Studio 2010. It was working fine until some time this week. Now when I make any change to the form and the designer recreates the .designer.cs file, all binding members are set to "none", and all Controls.Add calls are removed. The controls still are visible in the designer, but then when I run the project the

How to temporarily disable Visual studio auto generated events?

别来无恙 提交于 2019-12-21 12:07:28
问题 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 temporarily disable this feature? I still want it because it is a great short cut when I'm coding. Thanks! 回答1: You can't disable double clicking AFAIK but you can