winforms

Allow user to choose file/folder in C# WinForms app.

How can I user to choose a file or a folder from within my forms app? Is there not a built in component for it? ...

What's the deal with the ToolStrip's RenderMode property?

I never quite understood what this property was designed for. I can see that it visibly changes the design of the toolstrip and I find that setting it to System on Windows XP makes it fit much better with the WinForms style. Is there some deeper meaning here? Does the way in which the control is rendered change at all and which mode wou...

Render multiple images to a bitmap in C# Winforms

I'm developing a set of applications for use creating games in XNA. Using Graphics.drawImage I can easily draw a preview image from an XNA texture2D object. Each object, eg Character, Map etc, is made up of a List of parts, each part storing information such as position rotation and texture source. The next step is to render a preview o...

.net - Glass effect in C# 2.0 applications.

How can I give a Vista or Mac OS X style glass effects on windows forms applications in .net 2.0? ...

C# - Winamp Style 3-Window snapped application

How can I create a Winamp-Style multiple-form snapped application in C# and .net 2.0? ...

Programmatically Change Individual Cell Borders in a WinForms DataGridView

Hi and thanks for reading. I need to programmatically change the border of individual cells in a WinForms DataGridView. When searching on the 'net, I found this link (http://bytes.com/groups/net-vb/501128-changing-datagridview-cell-borders-runtime) which is the same thing that I am trying to do; however, there isn't a code example ther...

Is it possible to show a selection border rather than back-colour in a DataGridView?

My DGV has row BackColors set to various colours based on business logic. When a user selects the row the colour changes to the selected row BackColor thus obscuring the pre-set colour. I would like to preserve the original colour when a row is selected and indicate selection with (perhaps) a bold border around the selected row. Is this ...

Identify current session within Windows Forms application: session ID?

In ASP.NET, each session can be identified by its SessionID variable. Currently, I'm working on a project for which I want to be able to identify each separate user session. In other words, I'm looking for a session identifier or an equivalent variable. I've looked in the Application, Environment and AppDomain classes, but I couldn't fi...

How to deal with ToolStrip in Custom Windows Forms Base

Hello, I'll share my cue with everyone! My Form Base Class is frmExportBase.cs, so any Windows Form that I will create or use have to inherit from it, so this will be fine : namespace SResocentroAnalytics.Forms { public partial class frmExportCobranzaDiaria : frmExportBase { public frmExportCobranzaDiaria() { ...

Vista style explorer/folder view

I am trying to have a list of large (256x256) icons in a listview similar to vista explorer windows, but the winforms' listview control doesn't look like vista's listview. Before I dig into WPF, can someone tell me if WPF listview can do this? Basically I get this (solid blue selection): instead of this (semi transparent blue select...

How to validate and edit a cell value

Hi, I am working on C# winforms application with MS ACCESS as backend. In the datagridview i have a column "startTime". My requirement is I want to validate the startime and if required edit the value programatically and save it. for ex if the user enters "8.00 AM" instead of "8:00 AM" my program should not throw an error saying "inva...

Winforms control that indicates if single process is running

I'm working on a winforms app with an embedded vpn. I would like to have a control indicate vpn connection status by indicating whether or not the vpn process is running. Any help would be greatly appreciated. Thanks! ...

How to create a CheckedListBox column for a DataGridView

What is the easiest way to create a DataGridView column that contains a CheckedListBox control for each cell? The CheckedListBox does not need to be databound. ...

Dynamically generated drop-down menu appears in upper left corner of screen

I've plugged some code into the MouseDown and Click events of a ToolStripMenuItem to generate a menu at run-time, but the menu appears at the upper left corner of the screen instead of under the menu item. It doesn't matter if the code is in MouseDown or Click, the menu is always in the wrong place. What am I doing wrong? Here's a code ...

How can I control the location of a dialog when using ShowDialog to display it?

This is a very trivial problem but I can't seem to find a way of solving it. It's annoying me because I feel I should know the answer to this, but I'm either searching for the wrong terms or looking at the wrong methods and properties. I have a configuration dialog that's called from two places. The first is from the button on the form...

MDI Child.show() displays the form in a weird manner

Hi all, I have a main form that has 5 MDI children. When the main form is created, the mdi children are created and shown as well. I assign them different locations on the screen, but when they're shown they start with the default location and move in a disturbing way to the new locations. I tried to assign the location before I show t...

Windows Service vs Windows Application - Best Practice

When should I go for a Windows Service and when should I go for a "Background Application" that runs in the notification area? If I'm not wrong, my design decision would be, any app that needs to be running before the user logins to the computer should be a service. For everything else use a background app. Is my decision right? Moreov...

Font backward incompatibility

I am using Segoe UI for my winforms application. On XP, this font doesn't exist and I would like to have my app use Verdana instead. What's the best way of achieving that. ...

Alternative to ComponentOne 3D Surface Map Chart

We are investigating alterntive control libraries for a new project we are working on. One of the requirements is to display data in the form of a surface map, as per the ComponentOne Chart below. We've used the C1 control in the past but are not entirely happy with it - so wondered if anyone can recommoned some alternatives. Having...

How to get the handle of the topmost form in a WinForm app?

I have a WinForm app that has other child forms (not mdi). If the user presses "Esc" the topmost form should be closed even if it doesn't have the focus. I can use a keyboard hook to globally catch the Escape but I also need the handle of the form to be closed. I guess there is a way to do that using Win32 API, but is there a solution...