Visual C# .NET Part 3: Visual Studio.NET at Work

This third part in a series of articles by Michael Youssef provides comprehensive details on the Start menu in Visual Studio.NET and an entry-level discussion of toolbars and menus. Youssef talks about organizing your code files into solutions and projects. This comes from Michael Youssef's book Visual C#.NET (The Absolute Power). For Part 2, see here.

Contributed by
Rating: 4 stars4 stars4 stars4 stars4 stars / 47
June 07, 2004
Rate this Article:
MEH MEH++


SEARCH ASP FREE
TOOLS YOU CAN USE

advertisement


Visual Studio.NET is what .NET developers use to develop applications for the .NET Framework. So from now on we will use VS.NET to create all kinds of applications in this book. Microsoft spent many years developing this powerful tool using C#. Microsoft will use VS.NET to create all the products in the next few years. This powerful Integrated Development Environment (IDE) provides .NET developers with a lot of visual tools to minimize application development time, and you'll see how much time is saved when we develop our last application using VS.NET.

All Microsoft .NET programming languages use the same IDE. I mean that Visual Basic.NET, Visual C#.NET and Visual C++.NET developers will use only one IDE (IDE is another word for the most of tools that form VS.NET); the difference is that you will specify the programming language you want it to use. So in the same application, VB.NET developers will choose VB.NET project and VC#.NET will choose Visual C#.NET Project (Project is a group of files that form a part of an application). So in one application you can find VB.NET Projects and Visual C#.NET Projects to form one complete application. Figure 1 illustrates how to choose VB.NET projects and Visual C#.NET projects in VS.NET

Figure 1 illustrates that Visual C# Project is selected on the left pane. You can select Visual basic projects or Visual C++ projects.

youssef
Figure 1


VS.NET contains many features and tools, but for now we will discuss the components that you should know about it.

Start Page

Let’s begin by opening VS.NET and see what we get. Click on the Start menu -> Programs -> Microsoft Visual Studio.NET -> then select Microsoft Visual Studio.NET. Figure 2 illustrates the start page that opens every time you fire up your Visual Studio.NET.

Important Note: If you didn’t get the Start Page, you can open it by pressing CTRL+AL+R or from View menu -> Web Browser -> Show Browser option.


Figure 2


When you open your Visual Studio.NET, you may not get the same result as I do because your setting maybe different from my setting.

You will get the Start Page every time you open your Visual Studio.NET; this is where you can start creating programs (as we will know later). There are 9 useful links in this page; all of them require an Internet connection to be opened (except Get Started link, What’s New, and My Profile). The Start Page is an Internet Explorer page (It’s like any other web page that is hosted by Internet Explorer). We will discuss each of these links beginning with ‘Get Started’ link. Figure 3 illustrates the ‘Get Started’ Link which contains two tabs: the first one is the ‘Projects’ tab where you can create new projects or open one of the last 4 modified projects arranged by last date modified. The second tab is ‘Find Samples’ tab where you can search for code samples.

Important Note: A tab is like a button or link. When you click it, you will get another page which can contain other data. We use tabs to save page space. (Tabs will be discussed in detail later in the book.)


Figure 3

Figure 4 below illustrates the ‘What’s New’ link, which contains products information and many other features such as downloading VS.NET Service Packs and updates.


Figure 4

More Start Page Details

Figure 5 illustrates the ‘Online Community’, which you can use to get more information and to contact other VS.NET developers all over the world via forums, newsgroups, websites like www.codeproject.com. The content of this page is filtered using your help filter setting (that we will set up in the ‘My Profile’ link). If you set your help filter to Visual C# and Related, you will get only the information related to C# and .NET Framework.

youssef
Figure 5

Figure 6 shows the ‘Headlines’ link, which when connected to MSDN online provides you with technical and knowledge base articles and news. This will be very useful for you every day you program with C#. Consider this link as a shortcut to the useful links and information about C# from MSDN web site.

youssef
Figure 6

Figure 7 illustrates the page that will show up when you click on ‘Search Online’ link which will allow you to search the online MSDN and you must be connected to the Internet to be able to search the MSDN. Just type a keyword and click the Go button, and you will get the result from the web site.

youssef
Figure 7

Figure 8 shows the ‘Downloads’ link, which is the most useful link here because it provides products updates, sample code, and many other downloads. Try to check this link each month. This link is updated with the latest downloads from Microsoft.

youssef
Figure 8

Figure 9 shows the ‘XML Web Services’ link, which you will find useful when you know more about Microsoft.NET web services.

youssef
Figure 9

There is also information to use if you developed a web service (see Figure 10) and you want to host it. This link is attached to www.msdn.microsoft.com and will give you a list of web hosting companies that you can use to host your web services. But it’s not a free hosting.

Figure 11 shows the ‘My Profile’ link, which provides you with options to customize your Visual Studio.NET environment. For now we will change one option only and it’s about help filter. After you click on the link, change the Help Filter to Visual C# and Related so you will view only information about C# and related sections like .NET Framework and any related information.

youssef
Figure 10

youssef
Figure 11

Now that we have finished the start page links, we must now discuss the VS.NET menus and toolbars. Then we will begin developing our simple console application which will ask you for your name and print it again to you (the same application that we developed using C# compiler) and while we are developing the application we will discuss more about using VS.NET.

VS.NET Menus and Toolbars


 
Most Windows users know about Menus and Toolbars. Anyone who uses Microsoft Word or Excel or any other program on Windows knows that a Menu is a group of related commands that allow you to perform commands by clicking on the menu name (‘File’ for example) and selecting the command (menu item) from the list. A Toolbar is a bar that contains a group of buttons and each button contains a picture that illustrates the functionality of that button. You will find that toolbars correspond to many of the menus items. For example, there are two ways to save a file. You can click on the Save button in the toolbar or from the File Menu -> Save menu item. So consider the toolbar buttons as shortcuts to the most usable items in the menus. Something else to note about Menus and Toolbars is that the picture of the toolbar button is the same picture of the corresponding menu item. Look again at the Save button in the toolbar and then look at the Save menu item in the File menu and you will find that they have the same picture.

When you hold your mouse to hover the cursor over a toolbar button, you will get some description of the functionality of that button called “tool tip”. You can use tool tips to know more about toolbars buttons.

Shortcuts

You can execute menus and toolbars command through shortcuts. A shortcut is a faster way of executing commands. A shortcut is a combination of keys (keyboard keys) that you can press to execute the command. There are two ways to know the shortcut for a particular command:

  1. You can know the shortcut (if it exists) of any particular command from the menus. If there is a shortcut for a given menu item, it will be associated with it. Figure 12 illustrates the File menu and the Save menu item selected with its shortcut.

  2. You can know the shortcut by using the tool tip too. By default the toolbars’ tool tips will not view the shortcut of that command, but you can do that from the Tools menu -> then Customize, and you will get the window in Figure 13. Select the option tab, then check “Show Shortcut Keys in Screen Tips”.

youssef
Figure 12

youssef
Figure 13

Menus in VS.NET are dynamic, meaning the menu items can be changed depending on specific modes in the environment (VS.NET). You will see this functionality when you work with different projects and different modes in VS.NET.

There are many toolbars that you can view in VS.NET IDE. You can get a pop-up menu that contains all the available toolbars. To get this menu, put your mouse pointer on any place in the toolbars or menus and right click. This menu contains all the available toolbars that you can view. For now we need the standard toolbar which contains the save, open, new commands. It is selected by default. If you found any other selected toolbar (selected toolbars contains a check mark beside it) deselect it please. Figure 14 illustrates the toolbars’ pop-up menu and the standard toolbar selected.

youssef
Figure 14

I think by now you have a good overview of the VS.NET, so let’s get ready to create our application.

Creating Solutions and Projects

Recall when we created our simple program using csc command-line compiler (in Part 2), we had one file and we compiled it to one executable file (executable file which has .exe extensions and as its name states, it’s a file which you can execute and run). But it will be difficult for us to compile more than one file (maybe our program consists of five files or more) and if we have errors inside one of these files or more, the compiler will not compile these files and you have to revisit all the files again and read all the code that you wrote; it’s not easy and no one like that.

When you use Visual Studio.NET for developing .NET applications, it will organize your code files into projects and solutions. A Project is a group of related files created by VS.NET. These files will form your program. VS.NET will create these files for helping you to find your program errors, another file that contains your project properties and configuration and many other things. A solution is another bigger picture for code organization. The real-time systems consist of more than one program working together to form the whole system or the complete application (like the windows operating system. It consists of more than one program working together). In VS.NET you can create a solution to contain more than one project. That’s the solution a group of projects that will form a complete application.

If you have more than one project (program) in your solution there must be one of them that will start your complete application (the solution I mean). In other words, if our complete application consists of four small programs (projects) there must be one of these programs (projects) that will start first; we'll call this project “start-up” project. It is the first project that will run when you compile and execute our solution.

blog comments powered by Disqus
.NET ARTICLES

- .Net 4.5 Brings Changes
- Understanding Events in VB.NET
- Objects, Properties, Events and Methods in V...
- Install Visual Web Developer Express 2010
- Microsoft Gadgeteer an Open Source Alternati...
- Best DotNetNuke Modules
- Facebook Image Viewer in Visual Basic
- Murach`s ADO.NET 4 Database Programming with...
- 5 Must Have Visual Studio 2010 Extensions
- Dynamic Web Applications with ASP.NET Mono u...
- PDFSharp: HTML to PDF in ASP.NET 3.5 using V...
- Using the PDFSharp Library in ASP.NET 3.5 wi...
- Sending Email in ASP.NET 3.5 using VB.NET wi...
- ASP.NET 3.5 Role Based Security and User Aut...
- Creating ASP.NET Login Web Pages and Basic C...

ASP Web Hosting ASP.Net Web Hosting Windows Web Hosting
 
 
 

ASP Free Forums 
 RSS  Tutorials RSS
 RSS  Forums RSS
 RSS  All Feeds
Site Map 
Request Media Kit
Write For Us Get Paid 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Privacy Policy 
Support 


© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 6 - Follow our Sitemap
Most Popular Topics
All ASP.Net Tutorials