winforms

Always handle the PreviewKeyDown event in a base form

We need to handle this event in the base form, regardless of which controls currently have focus. We have a couple of global key commands that need to work regardless of control focus. This works by handling the PreviewKeyDown event in the form normally. When we add a user control to the form, the event no longer fires. Am I missing s...

.NET 2.0 DataGridView ComboBox column - slow to display items

Hi, Any suggestions on how to improve DataGridViewComboBoxColumn performace with large item sets? I've got a DataGridView with several columns of type DataGridViewComboBoxColumn. I'm databinding those combobox columns to a rather large collection (10k+ items). As a result it's very slow to display the items (when i click on the down-ar...

Calling a control's Validate() method using Reflection

Hi All, I'm currently in the process of writing a wizard and want to make each page validate before moving onto the next page. I want to prevent the user from progressing by calling the Validate() method on every child control on the page and and stopping navigation if any of them fail. The problem is that the Validate() method on eve...

Are there any standards to follow in determining where to place menu items?

In developing Windows forms based application, are there any standards that should be followed when designing your form's main menu system? Most windows applications with menu systems will have your standard File | Edit | View | Tools | Help menus. How do you determine placement of any additional top level menu items? In addition,...

Can A winform app be switched to a WPF one if MVC architecture is used?

If we develop a winform app using an MVC architecture, it should not be too hard to change over to WPF at a later date, correct? ...

Why doesn't an installed font show up in the font picker dialog?

I've installed an OpenType font on my development machine expecting to then be able to choose that font for a label on a form. The font is available in MS Word so I'm reasonably confident it was installed ok, but I can't see the font in the font-picker dialog for the label in Visual Studio. I also checked the font settings in Tools > O...

Opening an application inside a form - C# or VB.NET

I am writing an application and I would like to be able to display another application inside it. (Think like a windows form with a small box, or a tab that is displaying a totally seperate application.) Is that something that can be done? If so, can anyone give some direction on how to go about doing it? I am looking for something i...

When should sizing grip (windows Forms) be used?

Should it be used for all sizable forms, or only when it is not easy to guess that a form is sizable? Is there a GUI convention to use it? Any link to a documentation would be appreciated. ...

Single instance form but not singleton.

Hi all, I cannot understand how this is possible. Please help!! I have an app with a trayicon. I want a form to be show when the user double clicks the trayicon. I have a problem where it is possible to get 2 or more forms showing by quickly triple or quadruple clicking the trayicon. The reason I don't want a singleton is that I want t...

.Net 3.5 Windows Forms Application: x86 vs x64 load times on 64 bit Vista

We are developing a Winforms application and in the process of optimizing the start-up time. The app runs on 64 bit Vista machines. In our testing we found what seems like a counter intuitive result. All else equal, targeting 32-bit vs 64-bit loads in half the time. Can anyone shed some light as to why? Thanks. [Edit] We deploy the...

Need an XNA framework equivalent, that WORKS with system.windows.forms (it doesn't have to work with XBox 360)

Next Semester I will be taking a "Software Practive II" class. In that class, my professor wants us to learn XNA. I have been playing around with XNA for quite sometime, and enjoy its functionality and simplicity. However, XNA does not take advantage of System.Windows.Forms. Using CEGUI# I was able to get XNA to work with System.Windows...

Internationalizing Desktop App within a couple years... What should we do now?

So we are sure that we will be taking our product internationally and will eventually need to internationalize it. How much internationalizing would you recommend we do as we go along? I guess in other words, is there any internationalization that is easy now but can be much worse if we let the code base mature and that won't slow us do...

C# Combine GDI+ and OpenGL/DirectX

Background: I am currently using custom controls within my C# project (basic controls just drawing a custom look and feel (using gdi+?)). The majoritiy of these controls have transparent segments for irregular shapes etc. Problem: I am looking to overlay a semi-transparent (irregularly shaped) panel over a group of controls. Currently ...

Free .NET Windows Controls Library?

Does anyone know any good and free .NET Windows Controls Library ...

ReadOnly rows in DataGridView

I have a binded DataGridView where depending on some BoundItem property value that line will be read only. What is the best way to implement this? Thanks ...

How to find the location of the icon in the system tray.

I have a NotifyIcon control that appears in the system tray. How can I find the location (x, y) of the icon on the screen? Thanks ...

Force multi-threaded VB.NET class to display results on a single form

I have a windows form application that uses a Shared class to house all of the common objects for the application. The settings class has a collection of objects that do things periodically, and then there's something of interest, they need to alert the main form and have it update. I'm currently doing this through Events on the objects...

How to run Google Earth Inside a WPF Control

Hi: I’m trying to run Google earth inside WPF but I don’t know how. Basically I have managed to run Google Earth in a Windows Form Control inside a Windows Form, everything was OK. Trying to do the same thing in WPF, well, give strange result a small Google Earth screen placed anywhere in the form an not inside the User Control I have...

.NET RichTextBox undo

I'm using a RichTextBox in WinForms 3.5 and I found that when I programmatically edit the contained text, those changes are no longer available to the built in undo functionality. Is there a way to make it so these changes are available for undo/redo? ...

mvc framework for winforms .net

please suggest me a good MVC framework for Winforms. ...