Friday, 31 October 2014

Stylish ToolStrip Button Control With Image and Text Control In Windows Application Using C#.Net

10/31/2014 - By Pranav Singh 0



This article will show you how you can use a Stylish ToolStrip Button Control with Image and Text Control In Windows Application Using C#.Net. This will show the image with large image.


So for this article first I have created a new windows application. In this form add a tool strip control.


Now add a button on tool strip control and select the image. After selecting image your form control will look as shown below.


Now for making it stylish I will make some property changes. First we will select image.


After selecting image it show only image, for displaying text also we will set property DisplayStyle.


Now for putting image above the text we will set the below property TextImageRelation.


After setting it’s showing small image, now we will set property to make the image look more visible. For this we will set property ImageScaling.


After setting all the properties your form control will look as shown below.

Now we have done. Now we will add click event on button. Please check the below code.

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

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            MessageBox.Show("This is new button click.");
        }

        private void toolStripButton2_Click(object sender, EventArgs e)
        {
            MessageBox.Show("This is exit button click.");

        }
    }
}

Now we have done run the application to check the output.
 

About the Author

We are the group of people who are expertise in different Microsoft technology like Asp.Net,MVC,C#.Net,VB.Net,Windows Application,WPF,jQuery,Javascript,HTML. This blog is designed to share the knowledge.

Get Updates

Subscribe to our e-mail newsletter to receive updates.

Share This Post

0 comments:

Please let me know your view

Free Ebooks


About Us

We are the group of people who are expertise in different Microsoft technology like Asp.Net,MVC,C#.Net,VB.Net,Windows Application,WPF,jQuery,Javascript,HTML. This blog is designed to share the knowledge.

Contact Us

For writing article in this website please send request by your

GMAIL ID: dotnetpools@gmail.com

Bugs and Suggestions

As we all know that this website is for sharing knowledge and providing proper solution. So while reading the article is you find any bug or if you have any suggestion please mail us at contact@aspdotnet-pools.com.

Partners


Global Classified : Connectseekers.com
© 2014 aspdotnet-pools.com Designed by Bloggertheme9.
back to top