winforms

MVP dependency injection

using MVP, what is the normal order of construction and dependency injection. normally you create a presenter for each view and pass the view into the presenter on constructor. But what if you have: A Service that multiple views need to listen to events on. Multiple views all pointing to the same data model cache. can someone displ...

Resources for windows form design and increased usability

The majority of resources that I have for UI design all deal with the web world. There are a number of advantages there because of the dynamic nature of the presentation layer. However, I would like to design better windows form programs. I want a professional flow to my applications. Right now they look pretty by using WPF, but events...

Auto refreshing the UI when business objects change

This is more of a design question. I am building a tool that displays business objects in various ways (ie Tree Nodes, List View Items, Combo Boxes, Text Fields, etc). Anytime the user changes any of one of them, an event is raised that signals that that business object has been changed or the collection that it belongs to has been c...

How to set selected row of DataGridView to newly-added row when the grid is bound to sorted DataView?

I have a DataGridView bound to a DataView. The grid can be sorted by the user on any column. I add a row to the grid by calling NewRow on the DataView's underlying DataTable, then adding it to the DataTable's Rows collection. How can I select the newly-added row in the grid? I tried doing it by creating a BindingManagerBase object boun...

Clearing the default empty value in a Winform Combobox of type: DropDownList

How do I go about making the default value of the combobox as the first item in the array. ...

VS2005 C# Currency Manager Issue with Position Not Changing

We have a custom collection of objects that we bind to a listbox control. When an item is added to the list the item appears in the listbox, however when one selects the item the currency manager position will not go to the position. Instead the currency manager position stays at the existing position. The listbox item is high lighted as...

Which .Net Timer() to use

I have a legacy WinForms Mdi App in VB.Net 2.0 which I am adding functionality to. One of the additions is a warning which needs to be raised when the current time nears a specified value (a deadline). My intention is to check the time once an hour until there is less than an hour until the deadline, then display warnings at specified in...

Winforms navigation bar control - like Explorer Address Bar

Can anyone recommend a .NET winforms control that offers similar functionality to the address bar in Windows Explorer, auto-completing file paths? I'm not too bothered about Vista-style breadcrumbs - quite happy with a simple XP-style textbox-only appearance, but I'd like it to offer auto-complete suggestions based on the file system. ...

How do I create Keyboard Shortcut Chords in my own Winforms Application

I want to create a component that allows us to have keyboard shortcut chords associated with an arbitrary command like the visual studio IDE does. ...

Application window sent behind other windows on closing different thread (C#)

I'm writing a Windows Forms Application in C#.NET On startup, the application displays a splash screen which is running in a separate thread. Whilst the splash screen is showing, the main application is initialising. Once the main application has finished initialising, the main form of the application is displayed, and the splash scre...

How do you prevent a RichTextBox from refreshing its display?

I have a RichTextBox where I need to update the Text property frequently, but when I do so the RichTextBox "blinks" annoyingly as it refreshes all throughout a method call. I was hoping to find an easy way to temporarily suppress the screen refresh until my method is done, but the only thing I've found on the web is to override the WndP...

How can I set different Tooltip text for each item in a listbox?

I have a listbox that is databound to a Collection of objects. The listbox is configured to display an identifier property of each object. I would like to show a tooltip with information specific to the item within the listbox that is being hovered over rather than one tooltip for the listbox as a whole. I am working within WinForms a...

Are WPF more 'flashy-like' than winforms?

Hi, I just installed visio, and the installer almost seemed like it was built in flash. The buttons kinda glowed when I hovered over them, and when I clicked on 'continue' the form phased out in a cool way. I'm assuming it was built in WPF. Anyhow, so are WPF more flash-like (visually speaking). Do they have new properties where you c...

XPS with Windows Forms

What is the best way to display and print XPS files in a Windows Forms application? ...

Model - View - Presenter with Virtual Grid

What is the best breakdown of responsibility when using a virtual grid and the MVP pattern in a winforms application. including: Getting callbacks from the grid on user changed cell updates Callback from the grid to set the style and value of a cell given a row and column ...

How do you determine if an Internet connection is available for your WinForms App?

What is the best way to determine whether there is an available Internet connection for a WinForms app. (Programatically of course) I want to disable/hide certain functions if the user is not connected to the Internet. ...

Custom button in C#: How to remove hover background?

Hi, I'm trying to do a custom button to my form (which has FormBorderStyle = none). I have my 3 states button images in an ImageList linked to the button. this.btnClose.AutoSize = false; this.btnClose.BackColor = System.Drawing.Color.Transparent; this.btnClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; this.btnClo...

Best Wizard Control for .NET Windows Forms?

I'm looking to add one or two wizards (you know, a simple dialog with multiple pages that walks a user through a process, step by step) to my WinForms application. I'm just curious of what controls -- whether they be third-party or you rolled your own -- you used to accomplish this? ...

Password protected .NET ClickOnce deployment?

How can I protect a ClickOnce deployed application with a password? Do I have to change the IIS settings of the web or is there a way to do it programmatically? I'm using Visual Studio 2005 (.NET 2.0). If I have to use web credentials, are auto-updates of the application still possible? Would be great if you could provide some sample c...

RichTextBox and underline color

Hi, Is there any way to change the color of an underline in a RichTextBox? I've tried http://geekswithblogs.net/pvidler/archive/2003/10/15/188.aspx but it doesn't seem to work. Anybody know where did those enum values came from? Didn't see any documentation for it. Thanks. ...