winforms

One config file for multiple environments

I'm currently working with systems that has quite a lot of configuration settings that are environment specific (Dev, UAT, Production). Does anyone have any suggestions for minimizing the changes needed to the config file when moving between environments as well as minimizing the duplication of data in the config file? It's mostly Appli...

Creating a WPF Textbox Control like Outlook email recipient textbox

Hi, I'm looking to create a WPF textbox control that acts similar to the email recipient textboxes in Outlook (the To, Cc and Bcc inputs). I don't necessarily care that much about auto-completion (i've found millions of examples for that), but what I'm really struggling with is how to have delimited text entries in the textbox behave as...

How to distinguish user vs programmatic changes in WinForms CheckBox?

I have logic on a CheckBox's OnCheckedChanged event that fires on form load as well as when user changes check state. I want the logic to only execute upon user action. Is there a slick way of detecting user vs programmatic change that doesn't rely on setting/checking user variables? ...

Panel moving after visibility changing.

Using WinForms and C#: I have a panel that contains a groupbox, some checkboxes, and textboxes. This panel is not always visible. Depending on user selections I show the panel. However, the screen is large enough that it requires scrollbars depending on your screen resolution. Does anyone know why the panel would move based on the Aut...

Handling right-click within a MenuItem

Is it possible to check for a right-click on a menu item in .NET? It appears that the framework doesn't expose it as an Event, but I've seen other applications (like Chrome and Firefox) which allow you to bring up a right-click context menu for a menu item. Presumably with a little event-loop magic you can do the same thing in .NET, ri...

TreeNode.EndEdit vs NodeLabelEditEventArgs.CancelEdit

What is the difference between TreeNode.EndEdit and setting NodeLabelEditEventArgs.CancelEdit? ...

Which articles I've should read before starting to make my custom drawn winforms app?

Hello! I'm currently developing a windows forms application with a lot of user controls. Some of them are just custom drawn buttons or panels and some of them are a compositions of these buttons and panels inside of FlowLayoutPanels and TableLayoutPanels. And the window itself is also custom drawn. I don't have much experience in winfor...

String Manipulation with Regex.

I will have a different type of string(string will not have fixed format,they will be different every time) from them I want to remove some specific substring.Like the string can be FUTIDX 26FEB2009 NIFTY 0 FUTSTK ONGC 27 Mar 2008 FUTIDX MINIFTY 30 Jul 2009 FUTIDX NIFTY 27 Aug 2009 NIFTY FUT XP: 29/05/2008 I want to remove the string ...

Regex to match with digit in the string.

I will have a different type of string(string will not have fixed format,they will be different every time) from them I want to remove some specific substring.Like the string can be OPTIDX 26FEB2009 NIFTY CE 2500 OPTIDX NIFTY 30 Jul 2009 4600.00 PE OPTSTK ICICIBANK 30 Jul 2009 700.00 PA I want to extract Rs.(digit) from those string a...

I have to click twice to fire an event

I'm developing a windows form application in C# and (SOMETIME) every button in the form need to be clicked twice to fire an event. Can anybody suggest a solution? Best Regards, BaDoOoReY ...

Will mdi applications die ?

I'm just curoius, Has mdi applications a bright future ? Edit: I mean mdi applications = free floating child windows (thanks to Guffa) not tabbed-interface application. ...

How to get sharepoint upload limit size by using sharepoint web services

In my application before uploading i have to check whether file size is greater than upload limit. How do we get share point file upload limit using web services in C#?? ...

add node names from an xml file into a combobox using c#

Im using c#.net windows form applpication. I have an xml file which contains many nodes. How can I get the names of those nodes into a combobox. If possible avoid duplicate names. ...

Is it possible to cascade the ppt slide show window and my application using C# code.

I have created an application that looks like a news ticker. It suppose to run on a machine which has PPT slide show running on it always. I have set this.TopMost = true So the ticker application overlaps the PPT. But I want that the ticker application as well as the ppt are seen together. This is possible only if I can cascade the...

WinForms Application Hangs

Hi, I have an application (ABC) that I developed and it as a windows application (.exe). It is by itself quite a big application referring a lot of dll's. However, now there is a requirement that demands that this application(ABC) be a part of an even larger application (XYZ). Hence, I had to change the project type of "ABC" from bei...

calling method of parent form in c#

Hi, i have opened a mainform and call a child form like Form4 f = new Form4(); f.Owner = this; f.Show(this); in form4, user selects a text file, the contents of which are to be displayed in a textBox1 of mainform i was trying something like Owner.textBox1.Text = "file contents"; but it does'nt work thanks in advance...

WinForms XML editor control

Does anyone know of a good XML editor library/control to use in a WinForms project? ...

WinForms: Why do I get InvalidCastException when showing folder browser dialog?

I am randomly getting InvalidCastException when showing FolderBrowserDialog and also many clients have reported this. I have not been able to find anything relevant on the internet. Does anyone know what causes this/how to fix this? My code: using (FolderBrowserDialog fbd = new FolderBrowserDialog()) { fbd....

Reloading ChartFx component asp.net WinForms

I'm using a chart component on my asp.net WinForms application and I'm getting an unexpected behavior. I've a tree with some links, and when I click on some node, my chart data should update and show the new chart obviously. But, I click the node, my code-behind update the data, but my component (that is inside an update panel) don't ch...

How to determine if DataGridView contains uncommitted changes when bound to a SqlDataAdapter

I have a form which contains a DataGridView, a BindingSource, a DataTable, and a SqlDataAdapter. I populate the grid and data bindings as follows: private BindingSource bindingSource = new BindingSource(); private DataTable table = new DataTable(); private SqlDataAdapter dataAdapter = new SqlDataAdapter("SELECT * FROM table ORDER BY id ...