C# - Resize Label Font Using TrackBar

C# - How To Change Label Font Size Using TrackBar In C#

change label font size


In This C# Tutorial  We Will See How To Resize label Font Size Using TrackBar 
In CSharp Programming Language.


Project 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 Form13 : Form
    {
        public Form13()
        {
            InitializeComponent();
        }

        private void Form13_Load(object sender, EventArgs e)
        {

            trackBar1.Value = (int)label_MSG.Font.Size;

        }

        private void trackBar1_Scroll(object sender, EventArgs e)
        {
            label_MSG.Font = new Font(label_MSG.Font.FontFamily, trackBar1.Value);
        }
    }
}





Share this

Related Posts

Previous
Next Post »