Library sample chapters
Introduction to Windows Forms
Sample chapter from C# and the .NET Framework
Defining the Border Style
The previous examples are both simple, fixed-size forms that have no minimize or restore button. The border style of the form object controls how a form is shown and if it can be resized.
Listing 3.1.4 shows a very simple Windows Forms application with a sizable client area.
Listing 3.1.4 resize.cs: A Simple Resizable Windows Forms Application
using System;
using System.Drawing;
using System.ComponentModel;
using System.WinForms;
public class SizeApp : System.WinForms.Form
{
public SizeApp()
{
this.Text = "SizeApp";
this.MaximizeBox = true;
this.BorderStyle = FormBorderStyle.Sizable;
}
static void Main()
{
Application.Run(new SizeApp());
}
}
Building and running this application will result in a resizable application that can also be minimized to the taskbar and restored in the normal way.
Related articles
Related discussion
-
C# video Editing/rendering
by pkuchaliya (0 replies)
-
How to Fill DataSet with more records (around 1 lakh) in a faster way
by Jayaram P (0 replies)
-
Can't print on the network with MSADESS ??
by anatha1 (2 replies)
-
Very Urgent regarding deleting the images from a folder
by Nanosteps (6 replies)
-
DataGridViewComboBoxColumn not showing values
by sachinkalse (0 replies)
Actually all you have to do in place an ampersand before the letter you want underlined.
So if you want the "r" in "Print" underlined, enter in the code:
"P&rint"
That's it.
if you want to view the _ all the time for alt shortcuts you have to go to:
display properties->appearance->effects
and uncheck the "Hide underlined charactors for keyboard navigation until I press the ALT key" checkbox.
these instructions are for XP SP2 Pro build 2600
The "" on the short-cut character is visible only when "ALT" is pressed. Is it possible to display the "" programatically???
This thread is for discussions of Introduction to Windows Forms.