winforms

Filtering Subreport data on a Winforms report

I am using Winforms Reporting Services (RDLC) to generate a report that has a subreport. My problem is the subreport isn't being filtered by the parent ID. A simple example of the data model might be a Department which contains Employees. In the report I want to show all Departments and have a subreport to show the Employees that bel...

How can I set the position of my datagrid scrollbar in my winforms app?

In my C# winforms app, I have a datagrid. When the datagrid reloads, I want to set the scrollbar back to where the user had it set. How can I do this? EDIT: I'm using the old winforms DataGrid control, not the newer DataGridView ...

Gray out dates older than the MinDate in WinForms MonthCalendar control

I am using the MonthCalendar controls in a Windows Forms application. I want to gray out the dates older than the control's MinDate (or give the user some visual clue about which dates are not valid for selection). The control has no property for getting the behaviour I expect. I have tried the UltraDateTimeEditor from Infragistics but i...

Help me analyze this callstack to see whats calling my method

Ok, so I have a very simple form with next to no logic in it that is controlled by by a presenter. There is a method on it public void Reset() that resets the form to its initial state. This should be called only by the presenter and in very specific cases (such as an activity timeout). I am running into a problem though where in a fe...

Custom Publish/Subscribe eventing and the build it .Net eventing in Winforms

I had to design and implement my own publish subscribe eventing to satisfy the requirements of a dynamic UI Winform design. Is there any .Net library that supports pub/sub out there that I can compare mine and improve? ...

Tool that resizes .NET winform to resolution

Is there a freeware tool that can resize a .NET winform window on a running application to a specific resolution? If I'm running on a large resolution and want to see what a window looks like at a specific resolution, this tool should resize a single window to that resolution. I use to have something like this but not sure what the nam...

Programmatic Navigation through a Context Menu in .NET WinForms Framework 2.0

I have a Windows Forms application, written in VB.NET framework 2.0. I have a grid that has an associated context menu with the following structure : MenuItem1 MenuItem2 --> SubMenuItem1 SubMenuItem2 --> SubSubMenuItem1 MenuItem3 ... I wish to display the context menu when a part...

Datacontext Lifetime in WinForm Binding Scenario

This one has been stumping me for a while. But I'm no expert. This is a bit long... I have a WinForms app with an Outlook style UI. That it to say there is a bar on the left hand pane that allows you to select a 'screen' which is a WinForms control, say the customer screen, and on the right hand pane there will appear a list of custo...

DataGridView.CellContentClick

DataGridView.CellContentClick is not firing if I mouse click a DataGridViewCheckBoxCell very fast. How can I solve this? I need to know when CheckBox's check state changes ...

IDE for C# language, uses .NET, compiles to CLR - but looks like Delphi?

One of the down-sides a transition to Visual Studio is that the IDE is not as good as the "traditional" Borland Delphi IDE. Unfortunatly Borland itself transitioned away from it's own "Visual Basic clone" IDE, in favor of the Visual Studio look and feel. i understand why it was done - they didn't want to re-create a WinForms designer wh...

Winforms: Is it safe to delete the code in the automatically created Dispose() method created by Visual Studio for Windows Forms

Background In Visual Studio 2008 Create a new Windows Forms Application, this will create a skeleton project with a class called "Form1". VS2008 automatically creates a Dispose() method. /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be di...

how to show highlighting arrows like in Coderush

I am programming winforms using c# and vb.net. I love the arrows used in coderush. for those who have not seen coderush arrows ,please see this image. http://www.aspnetpro.com/productreviews/2004/08/asp200408bn_p/asp200408bn_p_image002.jpg I want to have something similar in my program. only difference is i will be using it to hi...

Best approach to Windows Forms rolling log output in TextBox

In a Forms application I'm displaying log output from a long running command-line application that generated a lot of output. I start the program in the background, and capture its output and currently display it in a TextBox using AppendText. I prefer to only display for example the last 1000 lines. Removing lines from a TextBox is expe...

Views and presenters directorys structure . .

For a winforms app, what do you think the ideal directory structure for views and presenters and your model are ...

If exception handling should be centralised is the design of WinForm components flawed?

Or any other design that has the gui widgets as being the first port of call where an unhandled exception will kill the app? We all want one main: "catch all" for face saving purposes (although in most cases this shouldn't have a "continue" feature) but it is impossible to easily implement one with gui widgets that are the first port of...

What does "active directory integration" mean in your .NET app?

Our marketing department comes back with "active directory integration" being a key customer request, but our company does not seem to have the attention span to (1) decide on what functional changes we want to make toward this end, (2) interview a broad range of customer to identify the most requested functional changes, and (3) still h...

What could cause redraw issues on 64-bit vista but not in 32-bit in .NET WInForms?

This happens when compiling for Any Cpu as well as compiling to x86. Sections of the GUI doesn't redraw unless it's resized, for instance if the main form is maximized some of the controls don't resize with it, and others have sections that don't redraw and displays the what was previously there. This works fine on 32-bit machines, bot...

Windows Forms: Progress Bar Unresponsive

I have a small application to convert several file formats, with a main windows form which contains several text boxes, buttons, etc. I have another "Document" class which handles all of the actual conversion work, and my form essentially iterates through all of the files, and calls the proper Document methods to convert the files. Whi...

When is Winforms the correct choice vs. WPF?

Disclaimer: I'm not generally a Windows Client developer. I presume that WPF is intended to eventually replace WinForms altogether, but for now, they both are shipping. My question is, when is one more appropriate than another? Should we be leaving Winforms to legacy and creating new Windows Clients in WPF only? ...

Determine Label Size based upon amount of text and font size in Winforms/C#

Hi there, I'd like to know if there's a better approach to this problem. I want to resize a label (vertically) to accomodate certain amount of text. My label has a fixed width (about 60 chars wide before it must wrap), about 495 pixels. The font is also a fixed size (12points afaik), but the text is not. What I want to do is increase ...