Username:
Password:
Introduction to Microsoft Visual Studio 2008 Tutorials

Getting Started With Visual Studio 2008 / Toolbox

Subtitles of the Movie

Now let's turn our attention to the Toolbox. Now, I've got my Hello World application open. You can open any Windows application for right now and see this same Toolbox. Now notice that I have to be on the Form Design tab to see things in the Toolbox. I'll have to have a Form open to be able to see these because it is dynamically figuring out what particular controls I'll need for this particular project and where I'm working at right now. So, what I want you to see is that the Toolbox, first of all, is subdivided based on the type tools they are. Common Controls, you'll notice, Check Box, Button, Check List Box, some of the things down through here, and of course, there are a couple of ways that I can put things on here and I just inadvertently dropped something on here. Let me take that off. All you have to do is click on it and highlight it and Delete to take it back off. But notice there are a couple of ways I can do this and I will grab a Button, click, drag it over here and let it go and it will put the Button on there. Now I'm going to click on it again and Delete it off. I can also come over here and just double-click the Button and it will put it generally right in the center of the Form, so I can put them on here by double-clicking, right? Now, there are a lot of things going on here with the Toolbox that may not be readily apparent to you and I want to show you these things. First of all notice that I can expand and contract these, either by clicking on the little Plus or Minus sign, or just double-clicking on the container itself. And this is really cool because notice Menus and Toolbars, these things are all broken up into categories to make it easier for me to use them and so you owe it to yourself to kind of go through here and take a look at some of the possibilities that you have with the various tools in the Toolbar. Now, there are a couple of things you need to be aware of. First of all you can do a lot to customize this Toolbar. For example, if for whatever reason I'm working on an object or an application here where I use a Label a lot and it's hard to find. If I click on it and highlight it and then click again and drag it I can move it up here and put it under the Button, right, and then Check Box is kind of in the way, so I'm just going to drag it down and get it out of the way, so notice I've reorganized these and my Buttons and Labels are right up here at the top. So you can grab things and move them to the top and put them in the order that you like them so they're all up there together if you would like, OK? Better yet, you can right-click on the Taskbar and say Sort Items Alphabetically, and it just put them in alphabetical order, OK? Now notice, it did not necessarily do that for the other tabs. The commands that you do here are independent and so I can sort these items alphabetically inside this tab, and I'll have to move those pointers always at the top and I'll show you that in just a second. So let me move the Status Strip. So, notice Status is coming before M and now if I right-click and sort them it's actually sorting them. So, don't let Pointer bother you. I'll show you a good use for Pointer. If I click on Button and I come over here to drag it and I've decided now, whoop, I don't want to do Pointer I can either hit Escape on the keyboard or just come click on Pointer and I'm not going to have to drop a Button there. OK? Now, a couple of other things that are cool about the Toolbar. What if there's something here I just don't want to deal with anymore? This particular Ð let's say the Tree View. I'm not going to use this. I can right-click and say Delete and it will remove that from the Toolbox and I don't have to look at it anymore, OK? Rich Text Box Ð I'm not going to do that, so I'll Delete, remove it from the Text Box again. OK, so, I can customize very easily but now there's an even better thing and that is if you will notice I can right-click and say: Show All Items. There are some things that aren't out here and I click that and it adds a few more things to the Toolbar Ð notice, Office Ribbon Controls, because we can actually develop the Office 2007 Ribbon in here Ð Excel Controls, and so forth, and then I can right-click and Delete Show All and some of those will go away. So you can see more or less, OK? One other thing that you need to see, if you buy third-party controls and want to use them in here, or if there's something out there that you need to get access to that you don't have, and I'll show you a good example. In the Data section there are other Data Controls that don't show here by Default. Bill has made some decisions for you and you may not agree with Mr. Gates' decisions here, actually Mr. Gates is retired now, so anyway, I think it's Ozzy that we're dealing with Ð so anyway, if I right click Ð that's actually not part of the Course Ð but if I right-click on the Toolbar and come down here and choose items, now it doesn't say Add Items, and I think it should but again, they don't ask me these questions. If I say Choose Items it will eventually open up the Tools, Toolbox Items dialog box. Now this might take a while the first time you do it, but I'm going to scroll down and you'll notice how many Controls are out there. The ones that are checked are the ones that are showing in your Toolbox right now and I'm going to go up here to the Data section and show you that there is a Data Grid View Textbox and let's say that I want that, so I just click the Check Box and hit OK and you will notice it now shows up in my Toolbox and I can use it. So, there are lots of things you can do to customize this Toolbox. And then I'll end it with this one, this is a really cool deal. If I Ð let me go to my Pointer to clear that Ð if I go to my Code notice this is telling me, once I go into the Code section, I'll lose my tools but it says: There's no usable Controls in this group dragging at them here on this text to add it to the Toolbox. Well, let's say that I'm going to use this particular useless piece of code here, over and over in my project, all I have to do is highlight it, click it, drag it to the Toolbox and let it go and notice I just put it in there, OK, and so any time I want to use that again all I have to do is drag it back onto my Code Editor and drop it and I can very easily replicate that data. Now, that's going to help me because I'm not going to fat finger anything, that's useless code there by the way, but I'm not going to fat finger anything and I can drop it right where I want it. So anyway, there are some tips and tricks with the Toolbox, hope that helps. Just keep in mind you've got a lot of control here so make it look and feel like you want it to.

Tutorial Information

Course: Introduction to Microsoft Visual Studio 2008
Author: Mark Long
SKU: 34008
ISBN: 1-935320-54-8
Release Date: 2009-06-26
Duration: 7 hrs / 72 lessons
Captions: Available on CD and Online University
Compatibility: Vista/XP/2000, OS X, Linux
QuickTime 7, Flash 8

VTC Sign up & Benefits

  • Unlimited Access
  • 81,350 Video Tutorials (20,800 free)
  • Video Available as Flash or QuickTime
  • Over 782 Courses
  • $30 for One Month Access
  • Multi-User Discounts Available