Serialcoder en Français Serialcoder in English
TEL : +33 (0)9 72 13 15 17

Windows Forms FAQ

18. Windows Forms Tips

18.1 How do I write a screen saver?
18.2 How do I determine the screen resolution?
18.3 How do I determine the working area of a screen without the systemtray area?
18.4 How do I position my form to the bottom right of the screen when it opens up the first time above the system tray?
18.5 How do I change my screen's resolution programatically?
18.6 How do I determine the current date/time?
18.7 How do I determine the time taken for a long operation that I perform?
18.8 What are the implications of using the Timer class in System.Timers as opposed to the Timer class in System.Windows.Forms?
18.9 Is there an easy way to Create/Delete/Move files in the Windows File System?
18.10 How can I use XP Themes with Windows Forms using the .NET FrameWork 1.1?
18.11 How can I use XP Themes with Windows Forms using the .NET FrameWork 1.0?
18.12 How do I use Windows Forms Controls in Internet Explorer?
18.13 Are event handlers required to have this signature void MyEventHandler(object sender, EventArgs e)?
18.14 How do I change a directory name?
18.15 How do I beep the computer's speaker in a Windows Form application?
18.16 How do I use the system clipboard?
18.17 How do I add an application to the Window's Tray?
18.18 Why would I be getting a NullReferenceException in Windows Forms with no application code in the call stack?
18.19 When I try to catch the Resize event to handle sizing of MDI children, the event is called even before my form's constructor can create the children throwing an exception. How do I avoid this?
18.20 How can I tell if the user has changed some system preference such as the locale or display settings?
18.21 What mechanisms does .Net provide to convert one type to another?
18.22 Its possible that some of my class members will not be initialized when one of my virtual members gets called even before the constructor. How can I avoid this?
18.23 In a Hashtable, why doesn't setting the value for an existing key to be null remove the key from the Hashtable?
18.24 How do I create windows shortcuts on my desktop programatically in .Net?
18.25 How can I add a custom verb to the file and folder context menus in the explorer shell?
18.26 Can working on WinForms and .Net in general get exciting?
18.27 I have a long loop. How can I make my application continue to process events while it is executing this loop?
18.28 How can I display HTML in a Form?
18.29 The MessageBox always appears in the center of the screen. How can I change it's location?
18.30 If I have a button with &Next as the text, the N-accelerator key does not appear until I press Alt. Why?
18.31 How can I shut down/restart the OS from my Windows Forms Application?
18.32 I get a message 'DragDrop registration' failed. Why?
18.33 What is the purpose of the [STA Thread] attribute for the Main method of a C# program?
18.34 I add my application to the Window's Tray, set ShowInTaskBar to false, but the program still appears in the Alt+Tab list.

 

Windows forms FAQ