Sun Jan 04, 2009 12:42 pm
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
public class AppForm : Form
{
private System.Windows.Forms.Button mybutton;
public AppForm() {
InitializeComponent();
}
private void InitializeComponent()
{
this.mybutton = new System.Windows.Forms.Button();
this.SuspendLayout();
this.mybutton.Image = new Bitmap("Click.jpg");
this.mybutton.ImageAlign = System.Drawing.ContentAlignment.TopRight;
this.mybutton.Location = new System.Drawing.Point(13, 100);
this.mybutton.Name = "mybutton";
this.mybutton.Size = new System.Drawing.Size(140, 80);
this.mybutton.TabIndex = 1;
this.mybutton.Text = "My Button";
this.mybutton.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.button1.UseVisualStyleBackColor = true;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(300, 270);
this.Controls.Add(this.button1);
this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Name = "Image on Button";
this.Text = "Image on Button";
this.ResumeLayout(false);
}
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.Run(new AppForm());
}
}
Wed Sep 22, 2010 1:07 pm
Mon Feb 06, 2012 6:17 pm
http://csharp.net-informations.com/gui/button.htm
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.