Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com�s entire library of video tutorials.
Before we leave the section of the course on the visual studio .NET interface, I want to make sure that we cover how to build a project, coz this is a little different than it was in VB6, and obviously if this is your first look at visual studio7 with no prior experience you certainly are in dark about this. So I'm going to be using a small console application that I've written here. And you'll notice it has one class inside this one module, and it has in this worker class, I have one sub procedure, and you will notice it comes down to here. And then I have one sub main, this is the entry point for the program, and in my sub-main I am creating some objects and I'm creating some different threads and spawning those and so forth. We'll look at this in more detail later on, in the course when we talk about threading. But for now I need to build this into an executable file, and so you notice in solution explorer my project contains ThreadEx projects and references, my AssemblyInfo.vb and then my module itself. So one thing I want you to see that you can do, is I can determine where this executable file is located after it's built, and if I right click on my project name then come down and choose properties, then I will get the ThreadEx property page's dialogue box. Now if I click on configuration properties and then build, you'll notice the output path and I'm going to browse out and I'm going to put these files just on the root of my C-drive. Ok you'll notice the output path - C:\ - so when I build my executable files that's where they will be located. Now, to build an executable file in visual studio, I'm going to go to the build choice on the menu, and then I'll choose build ThreadEx to build this application; and so I choose build ThreadEx and you'll notice the output window pops up and it gives me some information. I'm going to scroll up, notice it shows where my build started and it has the ThreadEx, the project name and then it says it's preparing some resources, it's updating references, and these are references to other assemblies that maybe needed. You are performing the main compilation here, building satellite assemblies, and then finally the big news we are looking for is right here, build: 1 succeeded, 0 failed, 0 skipped - that tells me this was a success. Now what we just did in building this is we actually compiled our code, we built an exe, but now the exe exists only in Microsoft intermediate language or IL code at this point. And so if we go execute the exe file that was just placed on the C-drive, then that code gets converted into the CPU specific machine language by the CLR, and it gets converted on a Just-in-time basis. So what I want to do now is go out to the C-drive, and let you see here's thread exe and notice it's in the root of my C-drive, and it got placed right here. So now I have what I need. If I double click this you will see my application run, and you didn't get to see it run because I would have to run this from the command prompt, so let me go show you that. The way to get to the command prompt here in visual studio if I want to run some of my tools and things, is to go to the visual studio .NET choice. Start>programs>Microsoft visual studio .NET, then choose visual studio .NET tools, then choose the visual studio .NET command prompt. And from here I can type ThreadEx and notice it ran my application; don't worry about what all that means, just notice that it ran. Now I, also from here I'm going to type ILDASM, I'm going to run the dis-assembler. And we'll go out and take a look at this file, so I'm going to file>open in the dis-assembler and then I'm going to go out to the C-drive and get that new version of ThreadEx.exe that I had out there, and you'll notice here it is. There is the manifest, and if I double click this, this is information that's in the manifest and this is the self-describing information. And then here's the actual project itself, the code for it - notice there is module1 and if you'll notice here's my class, my worker class, and if I extend that you'll see here I didn't have a constructor, and notice there was no public sub-new. And then here is my public sub-main, notice the void here, this means what's passing any arguments to main, and if I double click that, you can see some of the information, some of the strings that I was running - a boss main, name of primary thread and so forth. So that's what happens, that's how you build a project in visual studio. To create your executable files that are then ready to run. So in the next video we are going to finish out this section on visual studio .NET by looking at the task window, there's some really cool things about tasks that you can do. Now I want to make sure and show these to you before we leave, so catch me in the next video.
| Course: | Microsoft Visual Basic .NET |
| Author: | Mark Long |
| SKU: | 33433 |
| ISBN: | 1932072349 |
| Release Date: | 2003-05-27 |
| Duration: | 6 hrs / 87 lessons |
| Captions: | No |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |