winforms

.NET splitter control display

Hey, I created a Winform in VB.NET, and I added a Splitter control to allow resizing of panels during runtime. My issue is that the splitter control is not apparent. I would like to make it appear in a way that the user would know the form can be resized. At the moment, I basically just changed the color, but I don't like how that l...

C# Charting - Reasonble Large Data Set and Real-time

I'm looking for a C# WinForms charting component, either commercial or open source, that can handle relatively large data sets and be reasonable scalable with regards to chart rendering and updates. The number of data sets to be displayed would be around 30. There would be between 15 and 20 updates per second for each data set. A line ch...

.NET Event for Application losing and gaining focus

Is there an easy way to detect when a .NET app gets or loses focus? ...

WinForms - Does the Form.DoubleBuffered property influence controls placed on that form?

Form has the DoubleBuffered property (bool, inherited from Control). If this is set to true, are all controls placed on the form drawn to screen in a double buffered fashion by virtue of being on the Form? Or do you need to worry about their own DoubleBuffered properties? ...

How to use TextRenderer.DrawText to get ellipsis at the start

The TextRenderer.DrawText method has a TextFormatFlags parameter. Using TextFormatFlags.EndEllipsis allows you to abbreviate the text with an ellipsis at the end so that it fits in the available space. However, I want to put the ellipsis at the start. Curiously enough there is no TextFormatFlags value to do this. I've considered progre...

Settings.Designer file and Staticness

I have a DAL class library that is included in my program as a DLL. The below line is from the DAL to initialize the connection. DataSet ds = new DataSet("table"); SqlConnection cnn = new SqlConnection(Settings.CMOSQLConn); When I run this I get the below error: An unhandled exception of type 'System.StackOverflowException' o...

How can I create a button with an embedded close button.

I am trying to create a panel which will have a set of "buttons" on it. These buttons should have the following behaviour: Appear similar to a tag (with rounded edges) Contain a red cross to remove the filter/tag from the panel, similar to the way internet explorer tabs have an embedded cross to close the individual tab. allow th...

richtextbox selectioncolor and selectionbackcolor property

Hi I want to select a particular line of text and highlight it with a Blue Color and i want the forecolor of that text to be white. I tried this.Select(start, length); this.SelectionBackColor = Color.Blue; this.SelectionColor = Color.White; but it doesn't work. What is wrong? I want to simulate the effect we get when we select som...

Toggle all controls Read-Only on Button Click in WinForm

I want to be able to set a bunch of controls on a Form to Read-Only and back with a button click. Is there a way to loop through them? this.Controls maybe...... Thanks! ...

Control.PointToScreen gives different results - why?

I have some Label controls sitting on Panel controls on a Form. I want to get the labels' positions relative to the form's origin so that at run time I can hide the panel and the labels and draw some other text in their place directly onto the form. Basically, I'm doing the following calculation: Get the absolute screen position of a la...

Will WinForms be deprecated in favor of WPF?

We're starting a new project and deciding to use Winforms or WPF. I've read some of the other SO posts, and realize that WPF has some advantages in the data-binding and appearance areas, but also has a steep learning curve and fairly immature tools and controls. We would like to better understand if Microsoft is planning on stopping ...

How to move insert caret on textbox when accepting a Drop

I have a TreeView and a Multiline Textbox together on the same form in a Windows form. I have drag and drop setup so that I can drag a node from the TreeView over to the textbox and insert text into the textbox (this is working). I would like to enhance this so that as the mouse is dragged over the textbox some sort of indicator moves ...

How to create semi-transparent Windows form like Microsoft Office 2010 TP?

I need to create Windows form that has the following features. Semi-transparent on top-half of form(about 100-200 pixel). Quick access toolbar like Microsoft Office 2010 TP. Control box(minimize, maximize, close button) that is generated by Windows API(I don't like to create custom control box). Thanks, ...

C# WinForms Rich Editor with Right-to-Left Unicode Support

Are there any rich editors for WinForms that support right-to-left and can export to HTML? The standard RichTextBox cannot export to HTML (Is there an RTF to HTML converter?) DevExpress's XtraRichEdit doesn't support right-to-left. ...

How to create a uninstall command for a Windows-based application in the Application Folder.

Hi, Can anyone explain to me how to create a uninstall command for a Windows-based application in the Application Folder when creating a new setup project in visual studio 2008. I've found info on the net but nothing helping me so far. If you could supply me with links or instructions it would be great. Thanks. ...

Why can't I edit the values in my DataGridView, even though its not set to ReadOnly?

I have a DataGridView, which is not set to ReadOnly. None of its columns are set to ReadOnly, and the object it is bound to is not set to ReadOnly. Yet, I can't edit the DataGridView items? The .DataSource property of the DataGridView is set to a ReadOnlyCollection<>, but I can programmatically alter the elements, just not from the UI...

Using XML to create a Windows Form

I am working on a Windows Desktop application that will store a number of documents, there will initially be 4 different types of documents, each as a windows form, each with some common details (document ID, client ID etc), and then different fields based on the document type. I plan on using XML to specify the fields for each form. So...

How can I bind a combobox field of a databound object to a datasource and still allow nulls?

I have a form databound to a customer object, and one of the fields is a nullable int representing a "type". This is displayed as a combobox, and the combobox is bound to the "Types" table. When a customer with a null type is loaded into the form's datasource, the combo box displays no value, but then upon clicking it you must select a...

Has anyone been able to use the .NET provider model with a winforms app?

I've seen oodles of examples for ASP.NET, but none for winforms. In other words, using the app.config instead of web.config. It would be a shame if it did not work. ...

Auto resolution text box control for .NET Windows Forms

I need to create a text box which will auto resolve what the user types based on a list of values, something similar to the "To" field in e-mail clients. For example, my list has these values: Car House Tree Typing "hou" would automatically resolve to "House", and trying to delete a single letter (with backspace or delete) of that wor...