Call Us:+1-888-888-888

Hello World With Visual Studio 2005

Home  /  Pendidikan  /  Hello World With Visual Studio 2005

12.Feb, 2020 Comments Off on Hello World With Visual Studio 2005 Pendidikan

Hello World With Visual Studio 2005

Hello World With Visual Studio 2005

Hello World With Visual Studio 2005

Hello World With Visual Studio 2005

Once you have completed the installation, which can take a while, load Visual Studio 2008. You will find it under Start/All Programs/Microsoft Visual Studio 2008/
Microsoft Visual Studio 2008. If this is the first time you have ran VS2008 you will need to select a default language. I chose C++ but if you are interested in C# choose that. Your layout may look a little different than mine.

Once all of the initialization has finished you will see the Visual Studio 2008 Start Page pictured below.

This image has been resized. Click this bar to view the full image. The original image is sized 600×429.

In the left column you can see the Solution Explorer and a tab at the bottom labeled Class View.

Solution Explorer
Solution Explorer provides you with an organized view of your projects and their files as well as ready access to the commands that pertain to them. A toolbar associated with this window offers commonly used commands for the item you highlight in the list. To access Solution Explorer, select Solution Explorer on the View menu.
Source

Class View
Class View displays the symbols defined, referenced, or called in the application you are developing. You can open Class View from the View menu. There are two panes: an upper Objects pane and a lower Members pane. The Objects pane contains an expandable tree of symbols whose top-level nodes represent projects. To expand a node selected in the tree, click its plus (+) sign or press the plus (+) key on the keypad.

Icons identify hierarchical structures employed within your projects, such as namespaces, types, interfaces, enums, and classes. You can expand these structures to list their members. Properties, methods, events, variables, constants, and other contained items are listed in the Members pane.

This hierarchical, project-by-project, view clarifies the symbolic structures within your code. You can use Class View to open files and navigate directly to the lines where symbols appear.

Source

On the Right..
You can see the Properties Window and two tabs, Toolbox and Server Explorer (these tabs are vertical along the upper right hand corner). The properties window displays sizes, dimensions and other “properties” for objects. The Toolbox tab is where you select components and add to your form. For a more in depth guide on using the IDE I suggest you pick up a good book or even take a class.

Lets Make Our Program
Select File/New/Project and the New Project window will appear. Select Visual C#. If you don’t see this option you may have to click the plus (+) beside Other Languages. This is because you have selected a default language other than C#. Highlight Windows Forms Application. Change the name to HelloWorld which will also change the solution name at the same time. Your window should look like mine:

This image has been resized. Click this bar to view the full image. The original image is sized 600×460.

Click the OK button.

Designing the Application
You should now see a new new tab in the center labeled Form1.cs [Design]* next to the Start Page. In the center of the window you can see your new form respectively named Form1. Click directly on this. A dotted line will appear around it and the Properties Window will fill with values.

The first thing you should do is name your form appropriately. Find (Name) in the properties window (you may need to scroll) which should have a value of Form1. Change the value to frmMain. Preceding the names of your objects with what they are (frm = form) will create legible, clean code that is easy to read when you edit your code 1 month later. In this tutorial all objects will have a preceding name which specifies what they are.

The 2nd thing you should change is the text of your form which currently states Form1. The text label is simply the “title” of your form. Scroll down (or up) in the properties view until you find Text with a value of Form1. Change the value to “Hello World”.

This image has been resized. Click this bar to view the full image. The original image is sized 600×429.

Adding functionality
Mouse over the Toolbox tab on the right hand side to view the objects you can use:

Click on Button. Place your mouse cursor over the center of your form (frmMain), left-click and hold. Move your cursor to the right and bottom to create a square. Release the mouse button. You should now see a button in the center of your screen with the Text/Title of Button1.

Baca Juga : 


Comments are closed.