NotifyIcon is .NET’s version of the system tray icon, those little icons that appear next to the clock in the Windows Start bar. .NET 2.0 added the ability to display a pop-up balloon tip pointing at a tray icon. However, this capability doesn’t always work as you would expect.
Handling keyboard shortcuts in your application can sometimes get a bit tricky. Consider the standard Ctrl+C shortcut, which every application should support as a “Copy” to clipboard command. When you users type in textboxes in your application’s form, they will expect that Ctrl+C will copy the selected text. But this feature is not supported by default; you have to explicitly write some code.
The DataGridView is a terrific control built into .NET that provides a customizable table for entering and displaying data. If you provide the DataGridView in your software as a means for the user to enter multiple rows of data, you may wish to redefine the default behavior of the Enter key. Read the rest of this entry »
When you show a .NET Form, by default the form will appear in the Windows Start bar and in the list of open windows shown when the user presses Alt+Tab.
You may wish to enable your WinForms application to run from a console window or command line. And when it does, you probably want to send output messages to the console window that launched your WinForms application.
Unfortunately Console.WriteLine()–the standard method of writing to the console window–by default will not work from a WinForms application. That’s because the console window that launched your WinForms application belongs to the cmd.exe process, which is separate from your WinForms application process.
If you use images in a .NET application, chances are you will find it more convenient to embed those images as resources in your project, rather than leaving them as separate files and trying to locate and load the images from disk when the application runs.
The DoDragDrop method on a control is synchronous. This means that when you call DoDragDrop to start a drag operation, the program will not return and execute the rest of your handler code until the user 1) drops the data she is dragging, or 2) cancels the drag operation. This is one of those little facts that you need to file away in your brain, as it could have a profound effect on your drag & drop logic.
Microsoft has released a beta version of the next major release of Visual Studio and the .NET framework.
Visual Studio “Orcas” will enable developers to write programs that can run on Windows Vista, Longhorn Server, Office 2007 and the Web. The .NET Framework v3.5 will provide better support for Web 2.0 and AJAX applications. Microsoft has been planning to release Orcas this year, but a corporate VP recently told ZDNet that it may not happen until 2008.