Sun Jan 04, 2009 1:00 pm
mybutton.Location = new Point(50, 50);
using System;
using System.Drawing;
using System.Windows.Forms;
class newButton: Form
{
public static void Main()
{
Application.Run(new newButton());
}
public newButton()
{
Text = "Button";
Button mybutton = new Button();
mybutton.Parent = this;
mybutton.Text = "Ok";
mybutton.Location = new Point(50, 50);
mybutton.Click += new EventHandler(ButtonActionClick);
}
void ButtonActionClick(object obj, EventArgs ea)
{
Graphics grfx = CreateGraphics();
Point placeText = Point.Empty;
string stringaction = "Clicked";
grfx.DrawString(stringaction, Font, new SolidBrush(ForeColor), placeText);
grfx.Dispose();
}
}
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.