winforms

User scope app settings always reset to defaults.

I have a WinForms app that uses the Settings feature of .NET 2, but the User scope settings values saved in the application often get replaced by the default values stored in the Settings class. Long ago I found guidance somewhere that attributed this to an auto-incrementing build number, and I suspect this is true. However, said guida...

.NET SplitContainer using C# Windows Forms

I've added a SplitContainer with a horizontal bar between the two panes. I can add content, and move the bar up and down to resize the containers, but the bar itself is invisible. I want the users of my application to see a visible split between these two areas. How can I do this? ...

How to change font size without creating a new font

Is it possible to change the size of a font in .net winforms without having to create a new Font with the new size? ...

Simple menu-like navigation in WinForms

Hello everyone, I am writing a very simple WinForms application with few data-entry forms. But before the user gets to these forms, she has to select which action to take (ie which form to open, possibly after entering a search query). As this application is a rewrite of a legacy custom DOS FoxPro app, the user wants the UI to be as sim...

Remove ClickOnce from a WinForms app

I have a WinForms application that was going to use ClickOnce. But it turns out ClickOnce won't work for my application, so I'd like to remove it. Only...there doesn't seem to be an obvious way to do this. There's no "Un-ClickOnce" button. Does anybody know what steps I need to take to get my app to be like it was before ClickOnce in...

Possible to capture ComboBox "DroppingDown" event?

I have a System.Windows.Forms.ComboBox on a form and I want to capture the event just before the ComboBox's menu is displayed (something like "DroppingDown"). I can't seem to find a suitable event. Is capturing this type of event possible with a ComboBox? ...

Updating a Progress Bar from Another Thread

I have a windows form on the main thread and another thread that does some calculations. I'd like to update the status bar on my form from the work being done in the other thread. What's the best way to do this? So far everything I've tried just makes things run really slowly. I'm using Visual Studio 2005. ...

What makes an app console or Windows Form application?

[Visual Studio 2008] I created a new project for console application and modified it to look like this: class Program { static void Main (string[] args) { Thread.Sleep (2000); } } Then I created another project for Windows Form application and modified it: static class Program { //[STAThread] commented this line...

C# transfer data from mssql to mysql

I need to transfer data from sql server 2008 express to MySql. The data is around 2.000.000 records in total and 4 tables. In C# I can insert these records very quickly with the Table-Valued parameter. (Around 50 seconds). Within a transaction. Now I was wondering if there is something similar for MySql that I can do in C#. ...

Override CurrentCulture for Winforms control

Hi, Does one of you know if its possible to override the CurrentCulture and the CurrentUICulture for a specific control in Winforms? So that this one specific controls uses a different culture? tia Martin ...

Windows control returns different values when accessed different ways

I have a control, hosted on DesignSurface. When its Location property is accessed by control.Location, and when it's accessed by propertyDescriptor.GetValue(control), I get different values. propertyDescriptor is of type PropertyDescriptor. Does anyone have a solution to this? I have checked that the object instance is the same. ...

Application Logs in Win Form Application

What is an application log? How is it different from Error Log? What kind of information should Application log file contain. Are there any built in classes which I can use for that? ...

ShowDialog() doesn't make the window modal

I have a windows form that pops up a dialog box if certian conditions are met when the form loads. The problem is the window does not stay on top and I can still click thing on the parent. However, there is a button on the form that when pressed opens the same window, when I do this it works as expected (like a dialog window). Is ther...

Drag-able WinForm Problem

I have a windows form that can be moved around by clicking and dragging on any portion of the form. I used the method of overriding WndProc, and setting the result of the NCHITTEST function to be HTCAPTION, in order to fool the form into thinking I clicked the caption - so it enables dragging. The code for this works great, and is be...

Clicking a control and causing it to shade

In windows when you click on an icon on your desktop, the icon darkens with a shade that is based on your windows theme that is currently used. I have a custom control that displays an image. I would like to have the same functionality as the windows icon click. How do I obtain the same result in WinForms by selecting my custom control...

C# grid DataSource polymorphism

I have a grid, and I'm setting the DataSource to a List<IListItem>. What I want is to have the list bind to the underlying type, and disply those properties, rather than the properties defined in IListItem. So: public interface IListItem { string Id; string Name; } public class User : IListItem { string Id { get; set; }; ...

Using F1 Help (CHM format) With WPF

I've been working on a WPF application for a while, and the time has come to attach the CHM format help document to it. But alas! HelpProvider, the standard way to show CHM files in Winforms, has magically vanished and has no counterpart in WPF. I've been trying to use WindowsFormsHost to spawn a new control so I can actually display th...

Update databindings when a TextBox changes rather than loses focus

I'm learning to develop for compact framework and I've come across an issue that's bugging me. I've bound a couple of textboxes to some properties (firstname & lastname of a person class) and have a menuitem which just does a showmessage of the full name, and it works fairly well except that the properties only get updated once the text...

How to make Picture Array ?

Hi How I can make Picture array ? How to insert picture and how to see any picture in the Array ? thank's in advance ...

How can I disable hittests on a Windows Form?

Is it possible to disable the hittest on a Windows Forms window, and if so, how do I do it? I want to have a opaque window that cannot be clicked. Thanks in advance, Christoph ...