Arrow جلوه دادن به دکمه
وارد کلاس program میشیم و این دستورات رو وارد کنیم
کد:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace AppSoftwareHesabDarePoshak
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(fals e);
Application.Run(new frmLoad());
}
#region Just Style the Buttons
public static void MakebuttonStyle(Button button)
{
button.MouseEnter += new EventHandler(button_MouseEnter);
button.MouseLeave += new EventHandler(button_MouseLeave);
}
private static void button_MouseLeave(object sender, EventArgs e)
{
Button button = (Button)sender;
button.FlatStyle = FlatStyle.Standard;
button.Font = new System.Drawing.Font(button.Font.FontFamily, button.Font.Size);
button.ForeColor = System.Drawing.SystemColors.ControlText;
}
private static void button_MouseEnter(object sender, EventArgs e)
{
Button button = (Button)sender;
button.FlatStyle = FlatStyle.Flat;
button.Font = new System.Drawing.Font(button.Font.FontFamily, button.Font.Size, System.Drawing.FontStyle.Bold);
button.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
}
#endregion
}
}