-->

Wednesday, September 23, 2015

Example to create tooltip using code in windows form c#

Example to create tooltip using code in windows form c#

Introduction
In this article i will show you , how to generate tooltip on controls using c# code. By using tooltip we can put some hints about task. I will give you an example of ToolTip in windows form c#. In this article we will use ToolTip class with their SetToolTip method.


Description

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 WindowsFormsApplication2
{
    public partial class Form6 : Form
    {
        public Form6()
        {
            InitializeComponent();
            settooltip();
        }

        private void settooltip()
        {
            ToolTip tip = new ToolTip();
            tip.SetToolTip(this.button1, "Default Push Button");
            tip.SetToolTip(this.textBox1, "Empty TextBox");
        }
    }
}

Read other related articles

Also read other articles

© Copyright 2013 Computer Programming | All Right Reserved