C# - Create Menu With Button In C#

C# - Create Menu With Button


__________________________________________________________________________

In This C# Code We Will See How To Make A Menu Using Buttons In CSharp Programming Language .


Source Code:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Animated_Menu : Form
    {
        public Animated_Menu()
        {
            InitializeComponent();
        }
        int i, j;
        Button[] buttons;
        private void Animated_Menu_Load(object sender, EventArgs e)
        {
            buttons = new Button[5] { button1, button2, button3, button4, button5};
            i = 0;
            timer1.Start();
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            if(i < buttons.Length)
            {
                buttons[i].BackColor = Color.Azure;
                i = i + 1;
            }
            else
            {
                timer1.Stop();
                for(j = 0; j< buttons.Length; j++)
                {
                    buttons[j].BackColor = Color.Aqua;
                    buttons[j].Font = new Font(this.Font.FontFamily, 15);
                }
            }
        }
    }

}
=> OutPut:

c# animated menu
Create Animated Menu In C#




Share this

Related Posts

:)
:(
hihi
:-)
:D
=D
:-d
;(
;-(
@-)
:P
:o
:>)
(o)
:p
:-?
(p)
:-s
(m)
8-)
:-t
:-b
b-(
:-#
=p~
$-)
(y)
(f)
x-)
(k)
(h)
cheer