winforms

The process cannot access - problem in winform C#

i made sdf file (sqlCE) from xml file. when the file is ready, i want to attach him to mail. but, when i try to attach i get error: "The process cannot access the file......because it is being used by another process" how i can fix it ? tank's in advance ...

Visual Studio Error: An item with the same key has already been added

When I'm trying to change the default Image of a Control on Windows Forms in Form Designer (no matter where on which control) I get this error: Error message: An item with the same key has already been added I tried to delete and recreate the Resources.resx file.. I assured that only 1 resx file with these keys exist.. (in fact t...

ALT Key Shortcuts Hidden

I am using VS2008 and creating forms. By default, the underscore of the character in a textbox when using an ampersand is not shown when I run the application. ex. "&Goto Here" is not underlining the G until I press the ALT key. Is there a way to have this underline the text that I put an ampersand in front of when the form/applicat...

Losing VB.NET "My.Settings" with each new ClickOnce deployment release

I am using the built-in My.Settings functionality in VB.NET to save application settings. This is very convenient but I notice that each time I release a new version, the settings are lost. Why and how can I prevent it? ...

Reliable/easy way to replace Windows.Forms control with a derived control?

I didn't follow my own best practices (use only derived controls), and I dragged a regular Windows Forms control to my form, wired it up and used it on my form ;-( Now I need to change the control to a derived control (derived from the same control), preserving all the settings from the designer. Is there a reliable/easy way to do this...

How to uses a ToolStripContainer whith Dock=Fill on a MDI parent???

How to uses a ToolStripContainer whith Dock=Fill on a MDI parent???... When I drop a ToolStripContainer on a MDI parent and assing fill to a property Dock it hide all the MDI children. thanks... ...

WindowLess WinForm or Console app to launch .bat files?

I want to launch a .bat file through a scheduler. The .bat file calls a third party command line tool. What's the difference between doing this through a console app vs a windowless winform application? I am using .NET. I prefer the app not show a DOS window. ...

Where to get custom controls for Winforms .NET?

Hi, I'm wondering if I can get some custom controls in winforms .NET? Is there any place? I'm looking for album control. (something like this: http://joomla15.sakic.net/gallery/78th-international-motor-show-geneva/#8 ...

How to refresh data driven combo box on a winform

I have a winform with a combo box thats filled from a query in the database. If I add a field to the database, the new field won't show up in the form until I close it and reopen it. I was able to put in a MessageBox.Show() and once that popped up, I closed it, and saw the new data in the combo box. EDIT: Let me clarify a bit. I hav...

Search MultiByte Strings using RegEx C# Winforms

I am working on html documents using WebBrowser Control, I need to make a utility which searches a word and highlights it in the browser. It works well if the string is in English, but for strings in other languages for example in Korean, it doesn't seem to work. The Scenario where the below mentioned code works is- Consider user has s...

How to communicate between a user control and my main form?

I have a few (1-3) user controls on my form. I want to be able to click a button on my form (that is not part of the user controls) and have all 3 of my user controls respond. How can I do this? ...

Windows Dialogs: when to use "OK + Cancel" and when to use "Save+Cancel". Is a Windows standard?

When does one use OK+Cancel in a dialog and when "Save + Cancel". I have seen them used interchangeably. Is there a window standard? ...

A table that shows MySql data, which the user can edit.

Hi all! I'm working on a C# application and need to give the users a user-friendly environment to work in. The idea is that a user uses his/her id and password so only data relevant to the user will show up in a table. I've figured out how to do this but now the user needs to be able to edit the contents of the table and since it's all ...

Customize DataColumn.Expression handling in C#

I would like to change behavior of DataColumn.Expression so that when I write: DataColumn.Expression = "MyMethod(Price)" it will call MyMethod, pass value from Price column into it and display evaluated value. How to acomplish this? ...

Handle DataTable.DataRow cell change event

I have a DataTable that has several DataColumns and DataRow. Now i would like to handle an event when cell of this DataRow is changed. How to do this in c#? ...

Transparent background for a control

I'm developing a winforms application (using .NET 3.5) In a form I have a panel control ,and a datagridview control inside of it . I want to have some control ( let's say for the simplicity - a label) to appear in front of the datagridview , and I want this label to be transparent - which means : I want to see the data displayed in th...

Show controls on multiple pages of a tab control in the designer

I want to use a tab control to switch between sets of data displayed in a DataGridView (currently I'm using radio buttons). At runtime I can just move controls from one tab to the next, but the SelectedIndexChanged event doesn't fire in the designer. private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) { tabContro...

Why is SynchronizationContext.Current null in my Winforms application?

I just wrote this code: System.Threading.SynchronizationContext.Current.Post( state => DoUpdateInUIThread((Abc)state), abc); but System.Threading.SynchronizationContext.Current is null ...

Whilst using drag and drop, can I cause a Treeview to Expand the node over which the user hovers?

In brief: Is there any built-in function in .Net 2.0 to Expand TreeNodes when hovered over whilst a Drag and drop operation is in progress? I'm using C# in Visual Studio 2005. In more detail: I've populated a Treeview control with a multi levelled, multinoded tree (think organisational chart or file/folder dialog) and I want to us...

.net Label accelerator key event

dumb question here, but I can't figure it out...I have a label with an accelerator key set (e.g. "&Add") and I want to give focus to a textbox when that shortcut, Alt-A, is pressed. what event does this correspond to? I tried the click event but that didn't do anything... edit: found my own answer - it sets focus to the control that is ...