winforms

C# Reporting Control (Interactive Reports)

Hello, can someone please recommend a reporting tool/control with good interactive capabilities for winforms applications?. I want to be able to create drill-down, drill-trough reports, highlight report controls on mouse-over, etc.. Support for exporting, charting, styling, using in web, and any added feature is a plus. ...

.NET (WinForms) Grid Control with Collapse/Expand Capabilities

Anybody purchased/used a DataGrid/GridView control that allows Collapsing/Expanding Parent-Child relationships? The standard DataGrid control, which I am using in .NET 2.0, seems to have limited capabilities with regards to this functionality. The newer GridView control doesn't support this at all to my knowledge. I was thinking ab...

autosize controls in TabPages

I have a TabControl consisting of several TabPages. One of these TabPages contains a TreeView and another contains a DataGridView. I would like these controls (and tabpages) to AutoSize to the maximum size allowed in the TabControl without scrolling. The DataGridView contains an AutoSize property inherited from Control which garbles the...

Displaying all the resources strings in a resx file

I have a "GUI Strings" .resx file in my application that holds all the strings that I display. I can obviously access each string directly via Resources.Resource_GUI_Strings.CameraSettings_BrightnessLabel But how do I list all the settings in the .resx file, as their (name, value) pair, is my only option using reflection? I want to...

UI Testing Framework + Continuous Integration ??

So I have an application that I inherited and I want to build up an automated test suite around it. The application wasn't designed with testability in mind, and the code is a "big ball of mud". My plan was to use a UI Automation testing framework and create a suite of tests at the UI level until I had enough coverage to allow me to st...

Smooth scroll in Windows Forms ListBox

Is there a way to enable smooth scroll for ListBox class in Windows Forms framework? (I'm using C# and .NET framework 2.0). ...

Accessing controls on a new form

Hey! I have 2 forms in my project, form1 and form2. When I click in a button in form1 I run this code: Form tempform = new Form2(); tempform.Show(); In my code for Form2 I have a label which I now need to change the text. How can I access the label? I tried: tempform.label1.value = "new text" And that didn't work, I even tried t...

Model view presenter, how to pass entities between view ?

Edit : Accepted Chris Holmes response, but always ready to refactor if someone come up with a better way! Thanks! Doing some winforms with MVP what is the best way to pass an entity to another view. Let say I have a CustomerSearchView/Presenter, on doubleClick I want to show the CustomerEditView/Presenter. I don't want my view to know ...

Migrating from WinForms to WPF... was it worth it?

I also have a desktop application in WinForms that is a middling size (a couple dozen major forms backed by 46 tables in the database). I'm thinking about rewriting the UI in WPF, but before I go there I was curious if there were any war stories about doing such a conversion. I use LLBLGen to generate my low level data access objects, a...

WinForms: Design vs Code

I am a solo dev building a WinForm App, C# & .Net 3.5, in VS2008. It is, essentially, a glorified data entry and retrieval application. My question is, Is it normal to spend %60 + of my time on "design"? The UI, placing all the controls, naming the controls something intuitive, setting properties on the UI controls(Modifier, onFocus...

Visual Studio isn't generating code to instantiate instance of custom control

I've created a custom control using C#, .Net3.5, and Visual Studio 2008. I'm then adding that control to another control by dragging it from the toolbox. After doing this when I try to compile I get an error as follows: Error 1 Warning as Error: Field 'MyNamespace.MyControl._myCustomControl' is never assigned to, and will always hav...

.NET: ListView blues?

Selection count, .SelectedItems.Count, does not change when the Selected property is set to true on an item in the Items collection of an ListView. Example: lvPept.SelectedItems.Clear() lvPept.Items(6).Selected = True Dim newLen As Integer = lvPept.SelectedItems.Count lvPept is a ListView and contains 10 elements. newLen is ...

What's the best way to shut down a .Net winforms application and delete the executable

I need to shut down my application and then delete the executable. I am doing it by kicking off a low priority batch job and then immediately shutting down the exe. Is there a better way? ...

Using a custom WPF control in WinForms

I'm going to have to build a custom control for a WinForms application. But in the near future that same control will have to be used in a WPF application. I've already written all the logic in a controller class which I can use for both WinForms and WPF (I will only have some databinding to do and that's it), but of course it would be ...

Datagridview scrolling/last row problem (.Net Winforms)

Hi all, I have a grid with 7 and half rows visible. I have managed to display the last row fully but the half row space after the last row does not repaint and shows whatever was there previously. Even if I drag another window over my form with the grid and then minimize it, the empty space shows content of the minimized window. I've tri...

WinForms TreeView

I am looking for a WinForms treeview control with following requirements: Should be not so hard to write code for it (most tree/list combinations are way too complicated) Should have some sort of easy drag and drop capabilities (including a vista-explorer style drop marker) Should be free or at least affordable Should provide some free...

MVC/MVP framework for .NET WinForms applications

Does anybody know a useable MVC/MVP framework for enterprise WinForms applications? Before there was User Interface Process Application Block for .NET. But it is not longer under development since Windows Workflow Foundation has been released (which also will be completely rewritten with .NET 4.0). Maybe i am not up-to-date, but i seem...

What is the preferred method for event handling in C#?

Which is the preferred/recommended way of handling events in .NET: this.Load += new EventHandler(Form1_Load); private void Form1_Load(object sender, EventArgs e) { } or protected override void OnLoad(EventArgs e) { base.OnLoad(e); } What would the pros/cons of each method be? I've used both methods over the years, and have usua...

Factory Model in C# and not using default constructor

I've been using the factory model to create child forms to add to a MDI form. This is the code I've been using: /// <summary> /// This uses the Factory Model to create the child node and then add it to the MDI Parent (this) /// </summary> /// <param name="childName">String class name of the child, i.e. RentalEase.Propert...

MDI Form detecting with a child form is added or removed

Is there an event I can use to tell if a child form has been added or removed from the MDI parent? ...