winforms

Double buffered ListBox

I have a CheckedListBox (WinForms) control (which inherits from ListBox; googling shows that the problem is with ListBox) that is anchored to all four sides of its form. When the form is resized, the ListBox has an ugly flicker. I tried inheriting CheckedListBox and setting DoubleBuffered to true in the ctor (this technique works with ...

windows forms

hi all, i have an application in which im using tabs.in the first tab im once again using forms. while navigating thru different forms the what shud be the default locations of the forms. i have given windows location = center for all of the forms,but one of the forms showing (appearing) at different location. i have set all the forms s...

database login prompt with crystal reports

I'm trying to display some report with some subreports inside it, but every it shows the report it throws some dialog box asking for database connection. I'm using this code: private void frmReporte_Load(object sender, System.EventArgs e) { Clave = ConfigurationSettings.AppSettings["Password"].ToString(); NombreBD = ...

How to reference column name instead of e.ColumnIndex in WinForm DataGridView event handlers?

Some event handlers for the WinForm DataGridView have DataGridViewCellEventArgs as a parameter and a ColumnIndex as a property of that argument. ColumnIndex is a number representing the column's ordinal #. Is there a way to reference a column name from that argument instead of column index? So instead of doing: if (e.ColumnIndex == 1...

Deferring DataGridView update when editing the underlying DataTable

If you have a DataGridView that is bound to a DataView (someDataTable.DefaultView). ..and a number of edits are performed on rows in the underlying DataTable from code. Is it possible to defer the updating of the DataGridView until you decide that you are finished editing rows? As it is, the DataGridView is updated after every edit, w...

Prevent Process 'A' from spawning Process 'B' which then shows up on top of what should be the "TopMost" Process 'C'

I have a windows form application which needs to be the TopMost. I've set my form to be the TopMost and my application works as I'd like it to except for in one case. There is a 3rd party application (referred to as player.exe) that displays SWF movie files on a portion of the screen that popup on top of my application. Using Process ...

How to add event handler to an inherited winform control?

I need to add an event handler to an inherited control like a datagridview but Visual Studio doesn't allow me. Isn't there a way for an inherited control to fire a base event handler AND the inherited one? in a sequence I specify? ...

Possible gotchas of embedded FlashPlayer?

I'm using embedded FlashPlayer in windows forms application. I'd like execute action script functions from C# passing unicode strings as arguments. According to adobe to invoke actions script function one should call CallFunction with a string that contains xml request. But they didn't say anything about character encoding of the xml re...

Customizing WinForms ErrorProvider to display it's icon inside control's entry

Hi, I have some custom/user controls that in most cases have label and entry, like this: Is there any way I can customize standard WinForms ErrorProvider to display it's icon inside entry (entry - textbox, combo, datetime etc...), like this: where red elipse is of course error indicator. Thanks for any help. ...

How can I get a list of all of the available print/fax drivers

How can I get a list of all of the printer drivers and fax drivers from the OS? ...

How to check that the user entered a unique value for a DataGridViewColumn?

I have a DataGridView with AllowUserToAddRows=true. The first column is an Id string which has to be unique. What's the best way to check that the Id the user entered hasn't been entered before? ...

Control another application using C#

I need to control other application by simulating mouse movement and keyboard input. How do I accomplish this in C#? Is it even possible? ...

silverlight 3.0 communication with winforms

I would like to create a winform on the client side for interaction with Silverlight 3.0. The basic idea is using the winform browser. I definitely need both the directions of communication. Would it be impossible by using JavaScript as a midware for the interaction or some better ways? Or is there any new features of Silverlight 3.0 sup...

Windows UI Design - The Combo Box

Until today I had not realized there was a difference between a list-box (like the HTML Form control drop-down selection box) and a "combo box" which is a combination of the list-box and the text-entry control. So the ComboBox allows the user to enter in a new value and if programed to do so, will append the value to the list of values ...

Numeric Notify Icon Windows Forms 1..2..3..

I need to create a Numeric NotifyIcon which should show the data in Percentage. like when minimized it should show 1% then 2% say after a gap of 5 seconds and so on. Any Ideas? ...

windows forms

hi all, cant we increase the windows form size more than 1452, 912..coz i have to show four data grid views on one single form and im not able to do it. ...

Using the MVC, MVP or MVVM pattern for a wizard written in WinForms?

All of the WinForms wizards I've written in the past have a high degree of coupling between the UI and the model. That is: the individual pages know about enabling/disabling the Next/Previous buttons, how to react to the Next button being pressed, etc. It makes it all hard to test, because to test any of the logic, you've got to put a lo...

WinForms Aero Wizard in C#?

I'm looking to implement a wizard C# in WinForms (not WPF), and I'd like it to comply with the Aero Wizard guidelines. Can anyone point me at some sample code? ...

Deserialize from MemoryStream throws OutOfMemory exception in C#.

This is a C# 3.0 Winform problem. I want to clone a big(not very big actually), complicated object. To do it lazily, I seralize it to a MemoryStream and use BinaryFormatter.UnsafeDeserialize(MemoryStream, null) method to get the cloned object. Inside the UnsafeDeserialize() method, there is always an OutOfMemory exception thrown. The me...

How to identify if an EXE is WPF

I am trying to find out if an EXE is a WPF app or a WinForms app. Any suggestions on how I can go about this? I have heard that I could use the Reflector tool, if so how would this be done? Thanks. ...