Login or Register

  Welcome: Guest


Home >> How To >> Programming >> Others >> Post New How To Bookmark and Share

Add Toolbar with icon into Visual Basic

April 01, 2012  by: naruto  Points: 12   Category: Others  Earning $0.50   Views: 639

Tutorial to add toolbar in the visual basic form with icons.

         

For any windows based application toolbar is very important thing. Using toolbar we can access all the features of the application with the shortcut buttons and more easily. Now in this tutorial I will teach you that how can we add toolbar on our application (form) in the visual basic software with the icons. This will make your application better in look. Let's see step by step procedure for the same.

How to add toolbar with buttons in the form:



Open Visual Basic program and open the form page where you want to put the toolbar. Now you will see the tools strip on the left side of the window. Just right click on it and click on the components, you will get the small window with the different components. Now check on Microsoft Windows Common Controls 6.0 (SP6) from the list as shown in the below image.



By selecting these components you will get few extra icons on that left tools strip.



With those extra icons you will also get the Toolbar option in it. Just double click on it. With this you will get the toolbar on the above part of the current form. Now to add buttons on this toolbar just right click on that toolbar and select the properties option. You will get new property window. From it, go to the Buttons tab, from there you can add buttons with the caption and other option like shown in below image. Now adding toolbar with the buttons is completed.



How to put icons on the buttons of the toolbar:



Now it is time to put icons on those buttons of the toolbar. It is easy too. As we said above, we got few extra features with that new component. With those extra features there is also ImageList option there. Just double click on it. You will get new icon on your current form by this. Now we need to icons in this ImageList. Just right click on that ImageList you will get it property window. From the General tab select the size of icon and from images tab add the icons you want to put on toolbar buttons, just as shown in image. And click ok after adding them.



With each icon, you will see the index of added icons as shown in above image. Keep remember those index number because we need that later. Now again right click on the toolbar on the form and click on properties. Now on the property page you will get the general tab. In general tab, you will found the third option as ImageList option. Now from it, just select the ImageList we have added in the form with our icons, as shown in image below.



After selecting ImageList in the general tab, go to the Button tab, you will get your buttons added already before. Now choose any button and put that image index (icons which you added in ImageList) in image option in that page. As per image index, you will get that icon on that button. Do the same for each buttons and click ok. That's it. Now you will found your toobar with icons on its buttons.



So here it ends of our tutorials. It's little long method but surely it is easy one. After repeating method for two or three time you will not need to see this tutorial again.

Note : - Just don't forget to add that component by right clicking on the tools strip available on the left side, because without adding the component you will not get the option for adding toolbar and the ImageList.

Hope it will be helpful to you. I will add few more related to it next time.




Comment(s)

No response found. Be the first to respond to this post

Post Comment

Please Log In  to post comment

Related Resources



Restore desktop Icon, Show Desktop
This tips will tell you to restore the desktop from menu. This is tested in XP machine.

Restore Show desktop Icon on the task bar
This tips will show how Restore Show desktop Icon on the task bar. This one tested on XP operating system.

Basic Trick of Business & Investment
This Article will explain the tricks in a business or investment.

Basic Things to Consider When Purchasing a Hard Drive
This article provides detailed information on what things to consider when buying a computer hard drive. I wrote the three basic but critical aspects that should be considered on a hard drive like compatibility, storage capacity, and hard drive speed.

How to Create a Shortcut Icon and Shortcut Key for Shutdown?
This article gives a detailed instruction on how to create a shortcut icon and shortcut key for windows shutdown command.

Latest Resources From The Same Category



Add Toolbar with icon into Visual Basic
Tutorial to add toolbar in the visual basic form with icons.

sample php Syntax
sample example of php Syntax which will helpful to the beginner of PHP programmer

 

Top Performers     Top Contributors     Share and Earn     Terms of Service    Privacy Policy     Contact Us