Tag Archives: forms

Use a bitmap for an icon in C#

You can’t set a form’s Icon property equal to a bitmap. Fortunately it’s easy enough to create an icon from a bitmap. This example uses the following code to make a form’s icon display the image in a bitmap. // … Continue reading

Posted in forms, graphics, image processing | Tagged , , , , , , , , , , | Leave a comment

Remove the Close button from a form’s system menu in C#

C# doesn’t have a built-in way to manipulate the system menu that appears when you click the upper left corner of a form, but it’s not too hard to use API functions to remove some or all of those buttons. … Continue reading

Posted in API, forms, system | Tagged , , , , , , , , , , | 2 Comments

Draw an analog clock in C#

This example demonstrates several useful techniques including: Context menus Restricting a form to a region to give it a shape. Moving a form with no title bar Double buffering Drawing with transformations Drawing an analog clock When you right-click the … Continue reading

Posted in animation, drawing, forms, graphics | Tagged , , , , , , , , , , , , , , , , , | 2 Comments

Make two forms open each other in C#

This is sort of a beginner’s exercise in making two forms work with each other, although it raises some non-beginner issues. Beginners often want to have two forms (or more) open each other. Unfortunately this is surprisingly confusing in C#. … Continue reading

Posted in forms, user interface | Tagged , , , , , , , , , , , | Leave a comment

Give an application beautiful icons in C#

This is a pretty long tutorial on how to build and use icons in an application. Contents Icon Sizes Creating an Icon File Using the Integrated Icon Editor Using External Icon Editors Inkscape @icon sushi Using an Icon File Clearing … Continue reading

Posted in forms, graphics, system | Tagged , , , , , , , | 1 Comment

Hide the taskbar and start button in C#

The example Make a form cover the taskbar and start button in C# explains how you can make a form cover the entire desktop, but the taskbar and start button are still there. If you really want to hide the … Continue reading

Posted in forms, system | Tagged , , , , , , , , , , | 1 Comment

Make a form cover the taskbar and start button in C#

It’s actually pretty easy to make a program cover the taskbar and start button. Just set the form’s FormBorderStyle property to None and set its WindowState to Maximized. You can do this at design time but this example does it … Continue reading

Posted in forms, system | Tagged , , , , , , , , , , | 1 Comment

Make a form fade out until it disappears in C#, Part 2

The example Make a form fade out until it disappears in C# makes a form fade out when the user clicks the form’s Close button, but there are several other ways the user can close the form without it fading … Continue reading

Posted in forms, user interface | Tagged , , , , , , , , , , , , | Leave a comment

Make a form fade out until it disappears in C#

Normally when you close a form it disappears. This example shows how you can provide a different effect by making the form fade out until it vanishes. (Like a ghost or a politician’s promises after election day.) A form’s Opacity … Continue reading

Posted in forms, user interface | Tagged , , , , , , , , , , , | 1 Comment