winforms

How to define TypeConverter for enumeration drop down in Propertygrid in Visual C++ Winforms?

I would like to create a drop-down in a propertygrid in Visual C++ where I define text for each item of an enumeration. I cannot seem to find any help for this anywhere - all the help seems to be targeted to C# users and I am unable to convert to Visual C++. I believe I need to create a TypeConverter that converts my enumeration to Strin...

what is the name of the app.config of a winforms app? and how can i know that the app loaded that app.config ?

well i basically cant add an app.config file to my win forms project. and i dont know if the application actually uses it or no. i used "Add" > "New Item" > "Application Configuration File" but well i dont know if the app reads the data from the file or no. so how can i know that the app actually reads that file? thanks ...

How to remove the caption bar of a window in c#

I would like to remove form frame in c# Picture: http://img251.imageshack.us/img251/9114/87017773.jpg Anyone know how can I do this ? ...

is it possible that an winform app load its dll from path other then the root?

I am including a library in my application, and it's copying 7 dlls with the same path as the exe. But I want to put these dlls in a sub folder. When I put the dlls in a subfolder the application doesn't see the dlls. So is there any configuration that describe where should the application look for its dlls? Also is it possible ...

how to change the location that the references dlls are copied to?

i am using some libraries and i added a reference to that library dll and i set the "Copy Local" to true. but i want to change the location of the dll to be a subfolder in the exe folder and not with the exe. how is this possible? thanks Update: i used the following Post-build event [as Jon Skeet recommended] move /y $(TargetDir)\Syst...

Visual Studio 2010 keeps changing my winforms control

I have an odd situation with a user control in VS 2010. The form designer keeps changing my entry and then telling me it does not exist! It compiles and runs the first time, and then if I change something unrelated, it gives me an error in the designer.cs file (Cannot resolve symbol SomeEntry). private SomeEntry someEntry; // ... this.s...

Issue with NotifyIcon.ShowBalloonTip, time interval

I've created notifyIcon object. But after I click button1 balloon seems to be shown infinitely, despite the fact that I've specified 1 millisecond (!!!) as interval. private void button1_Click(object sender, EventArgs e) { notifyIcon1.ShowBalloonTip(1); } What have I done wrong? UPD: i've found this: http://www.cs...

Winforms binding data

If I have a grid with a list of items (IList<x>) and a textbox on the form, is there a way to bind the data so that as I click a row that the textbox.text gets updated, without doing it explicitly? In other words, I want to be able to use Binding() or some other way, and not do OnSelectionChanged textbox.text = x.somefield as I will...

How to create CheckedListBox in DataGridView in winform. Link provided for referece

How to use CheckedListBox control in DataGridView Control in Windows Forms. These are under the namespace. System.Windows.Forms.CheckedListBox and System.Windows.Forms.DataGridView Is it possible. A code snippet will be a great help EDIT I need an help on this link that I found. I hope this might work. But I am more interested on ho...

How do you prevent problems with a button being pressed more than once?

In a windowed programming environment, a user may click a button more than once if they do not immediately see something happen. How do you stop the code behind the button being executed more than once in this situation? ...

How do I deploy an access backend?

Hello; I have created a windows forms application using Visual C# and ms acces 2007. The connection string to the database from the application looks like this. <connectionStrings> <add name="CRMS.Properties.Settings.CRMSConnectionString" connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\CRMS.accdb" providerN...

Create Row In Panel by Textboxes

am using C#, VS-2005 Is it possible to create row by using TextBoxes in Panel and increment the same as per panel vertical scrollbar. Suppose I have Three Column which is Draw by Label on specific area of panel and wants to draw raw by textboxes for above mention column and increment the same by clicking enter keypress event. as below....

C# passing string between voids

All i want to do is pass a string from one void to another. private void getFilename2() { if (textBox2.TextLength.Equals("0")) { } else { string inputString = textBox2.Text.ToString(); string last = inputString.Substring(inputString.LastIndexOf('\\') + 1); ...

UserControl in a DataGridView in Windows form

Looking for an example of a usercontrol in a datagridview row using Windows forms. The Usercontrol would have multipe controls based on the business logic which depends on the the index of the row. Thanks ...

solution for performing final work when winform is no longer needed

I need to accomplish the following. 1.) I have a winform (winformA) that is hidden instead of closed 2.) the winform in #1 is a child to the mainform, when i shutdown the mainform, the child form WinformA is disposed. I need to save data from a winform control in the winformA The content is in a ListView in WinformA. I have tried ov...

Tool strips are joined back to back on resizing the tool strip container.

I have a tool strip container in which i have two tool strips that are vertically aligned on the right panel of container and between these two tool strips I have a track bar. When i open the project as it is, then the form looks fine but as soon as i resize the form, the two tool strips join back to back and hence tool strip 2 hides und...

c# User Control Navigation

I am making a c# windows app that has one MainForm and many User Controls (LoginPage, HomePage, MyListPage, etc.) embedded inside it. I am using Visual Studio 2005 to design the GUI. In MainForm's constructor I do: Controls.Add(new LoginPage()); Controls.Add(new HomePage()); Controls.Add(new MyListPage()); ... LoginPage.show(); But ...

How to prevent cursor from "jumping" into textbox when you type

If you have a focus on a textbox but mousecursor not exactly hovering on it, mousecursor has default arrow shape or whatever you define. At the time when you start typing, mousecursor hide itself and you see only blinking stick IBeam type cursor in the textbox. Question: How to hold mousecursor on its initial position even if you star...

Looking for the optimal way to use custom font definitions in WinForms application.

Hi, I have a Windows Forms application where I need to make all fonts of all UI elements configurable from a separate file. I.e. I want to be able to specify that a label has a font "TitleBarBoldFont" which would resolve to a real font, depending on the current locale. The configuration file may contain a corresponding section like thi...

How can I store a reference to object property in another object?

This is a C# winforms app. Preface: I am creating a form that will allow users to import data from an existing MySql or SQL Server database into my SQL Server database. This allows users to quickly import IP addresses and other data without having to re-enter it via a control. Example: Simplified, I have two objects, FieldObject and ...