winforms

TabWorkspace in flotting window using C#

I am using .net Smart client framework with CAB to develop window based application. I want to add flotting window into tab workspace ...

Use Windows Explorer in .NET code?

Hi, Does anyone know if it's possible to use the bits and pieces of Windows Explorer in .NET code? That would be nice, for example, to write file management forms in other programs, and get that to look just like the explorer, and "follow" the different Windows versions. ...

Finding port number of connected device from Registry editor

hi can you pls tell me pls is there any win32 api,s are there for getting connected device port number.Now in my appillication i am giving hardcoded value for com port number . and for that i am checking manually from control panel -> phone and modem options , there i am getting port number. But now i am trying do this programm...

How can I refresh only the visible rows of a data bound DataGridView?

I have a DataGridView bound to a list of custom objects created on the fly. This list is not very large, 5000 items maximum. However, the values of the custom objects change every 50ms and the grid hangs the application while refreshing the values and it ultimately crashes. My question is: is there a way to "virtualize" the data binding...

ComboBox Reset to Select the Text of the ComboBox in windows Application

Hi, I had added the items 1 2 3 to the combobox. Then I gave the "Select" to the text of the combobox. How can I able to reset combobox to select the text("Select"). I had tried by giving -1 to the SelectedIndex. But it gives only Empty. This is for VB.NET Windows Application I have given an Image for your reference Image path fo...

c#/winforms: ItemCheckEventHandler after new checkstate has been applied

hello, i am looking for an event for a CheckedListBox, that fires after the checkedstate of an item has changed. the ItemCheckEventHandler is not good for me, because it fires BEFORE the new state has been applied. thanks! ...

How to hide checkbox from listview

I need to hide checkboxes only from specified rows. Is this possible and how? ...

Changing the color of a text box depending on its content

I have in a VS2005 C++ Form application a table adapter and a Text box that displays data from a specific column. What I want to do is to have its color changed on whether the content is >0 or <0. I tried adding this: if(this->CSumTextBox->TabIndex<0) { this->CSumTextBox->ForeColor = System::Drawing::Color::Red; } But it doesn't ...

Java's invokeLater() equivalent in Windows Forms?

I'm new to Windows Forms from the Java Swing world. Is there any equivalent for Java's SwingUtilities.invokeLater()? Or, how can I dispatch a task to be run on the main Windows Forms event thread? I'm performing a background task using a synchronous API on a separate thread. At the end of the task, I want to re-enable some disabled butt...

Setting the start position for OpenFileDialog/SaveFileDialog

For any custom dialog (form) in a WinForm application I can set its size and position before I display it with: form.StartPosition = FormStartPosition.Manual; form.DesktopBounds = MyWindowPosition; This is particularly important when dealing with multiple monitors. Without such code, when you open a dialog from an application that you...

Working with Forms

Hi, I'im writing a program that works with 2 forms, the main form and the form where the configuration is made, so when the user clicks toolstripmenu->Preferences the Preferences form is showned and I want it to make the user only capable of having one Preferences form at a time. When I use: Prefs preferencias = new Prefs; pr...

Can you bind separate date and time fields to a single DateTime in C#?

Our interface has the date and time in separate boxes. One box for date (with a DatePicker), one box for time (as a TextBox). Is it possible to databind a single DateTime (or preferably a nullable DateTime) to these separate values? (If not, what alternatives are there?) How can this be done? ...

Is it possible to embed metadata within Winform or control at runtime ?

MS Access and VB has Tag property for form and control where you can store at runtime and persist with the app. Is there something equivalent in .NET ? ...

DomainUpDown (spinner) control is cutting off the bottom pixel of displayed text

I'm using winforms and the DomainUpDown control's height is locked at 20 pixels, which results in "y"'s and other characters with descenders cut off on the bottom. My initial thought about how to fix the problem was to change the controls height, but I couldn't do so. In the designer I only have controls to drag it's size by width. ...

Chained custom FormPaint() in Embedded Forms causing 10 sec wait

I have created a Windows Form App for Managed Care(CRUD of Member Data). It is an internal app that uses Merge Replication to allow field use. The app basically follows this structure: Form Shell Form MemberHost Form Member Form MemberContacts Form MemberInsurance Form Enrollments Form CaseNotes Form MemberCenteredPlanHost Form M...

Designing Windows.Form with multiple panels -> How to hide one panel (like a PS layer)

How can I hide one panel in Visual Studio 2008 Form Designer like a layer in PS? Otherwise, can someone recommend another better method to design multiple "screens" that must be clicked through by the user? ...

Precasted About Dialog

I do need a good About Dialog for my app, something like the Visual Studio About Dialog. I'm kinda too lazy to design it myself and make all the properties. Does anybody know if there's a precasted one somewhere? Google didn't help me at all... C# + Winforms ...

winforms datagridview calculated field change event

I have a datagridview bound from a datatable. I have a calculated column linetotal that multiples unitprice * quantity. I also have a totalprice label,that I would like to contain the sum of the linetotal column in the datagridview. When the user makes any changes to unitprice or quantity, the linetotal should update for that line and...

Winforms: access class properties throughout application

Hi, I know this must be an age-old, tired question, but I cant seem to find anything thru my trusty friend (aka Google). I have a .net 3.5 c# winforms app, that presents a user with a login form on application startup. After a successful login, I want to run off to the DB, pull in some user-specific data and hold them (in properties) ...

How to install .exe as cron job or scheduled task? C#

I have a small program that I would like to turn into an installable windows.form. It needs to automatically be run as a cron job/scheduled task. How can I do this? C# ...