Sunday, January 11, 2009

Dock Top and Bottom tutorial example

using System;
using System.Drawing;
using System.Windows.Forms;

public class ControlDock : Form
{
public ControlDock()
{
Size = new Size(350,400);

int yButtonSize = Font.Height * 2;

Button btn = new Button();
btn.Parent = this;
btn.Text = "First Button";
btn.Height = yButtonSize;
btn.Dock = DockStyle.Top;

btn = new Button();
btn.Parent = this;
btn.Text = "Second Button";
btn.Height = yButtonSize;
btn.Dock = DockStyle.Bottom;
}

static void Main()
{
Application.Run(new ControlDock());
}
}

1 comments:

devnath said...

microsoft networking dums


email id: devbelel@yahoo.com (urgent)

Followers

The Daily Puppy

 
Design by Wordpress Theme | Bloggerized by Free Blogger Templates | JCPenney Coupons