Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums

Go Back   Code Forums > Code Newbie > Submit Tutorials > VB.NET

Reply
 
LinkBack Thread Tools Display Modes
Old 03-25-2004, 05:39 PM   #1 (permalink)
rdove
Masked Moderator
 
rdove's Avatar
 
Join Date: May 2002
Location: Indianapolis, IN
Posts: 260
rdove is on a distinguished road
Getting Started with VS.NET (VB)

Preface

What is Visual Studio.NET
Visual Studio .NET is a complete set of development tools for building ASP Web applications, XML Web services, desktop applications, and mobile applications. Visual Basic .NET, Visual C++ .NET, and Visual C# .NET all use the same integrated development environment (IDE), which allows them to share tools and facilitates in the creation of mixed-language solutions.

The .NET Framework
It is important to understand how the .NET framework operates. In order for a .NET application to run on any computer the framework must be installed. The .NET Framework is a multi-language environment for building, deploying, and running XML Web services and applications.

Common Language Runtime is a new concept on how programs run. The basic idea behind this is that it does not matter if you use VB, C++, or C# the program is going to be compiled and run the exact same way.

VB Layout

Understanding the layout of Visual Basic is essential for this tutorial because many of the objects identified here will be referred to throughout this tutorial.

Open Visual Studio.NET (Start --> Programs --> Microsoft Applications --> Visual Studio.NET)
Your screen should look similar to the one pictured below.

http://www.iupui.edu/~stc/Train/Onco...ing_screen.gif

Select the VB Projects folder. We are going to build a Windows Application so select that from the box and click Open. Your screen should look similar to the screen below.

Explorer Window
This window is used for managing forms and code for your project.

Properties Window
This window contains attributes to each object in your project.

Toolbox
The toolbox contains objects that you can use within your project. You will need to mouse over the toolbar text for the box to expand.

http://www.iupui.edu/~stc/Train/Onco.../VB/layout.gif

Lets Begin!

You should have a blank project open now. First, we are going to be adding the objects we need for this program to the form.

Expand your toolbox and drag the following items to your form:

2 Labels
1 TextBox
2 Buttons
1 ListBox

Position your objects on the form like the picture below.

HINT: To Resize and move objects try clicking on them.

http://www.iupui.edu/~stc/Train/Onco...s/VB/Step1.gif

Next we are going to change some attributes on the Properties Window to our objects. Remember to use the Properties Window.

Click on an object and change the following object attributes:
(Be sure to scroll through the list to find what you are looking for)

Form1
Name: frmList
Text: Name List

Label1
Name: lblTitle
Text: Name Listing
Font: 22pt Size

Label2
Name: lblName
Text: Name

ListBox
Name: lstNames

Button1
Name: btnSubmit
Text: Submit

Button2
Name: btnClear
Text: Clear List

TextBox
Name: txtName
Text: (delete contents)


Now that we have the form visually laid out, it is time to make this program do something with code!

Double click the submit button you put on your form. This should open the coding window. The picture below shows the code needed and an explaination of the code blocks

http://www.iupui.edu/~stc/Train/Onco...s/VB/step3.gif

Click the tab at the top that says Design

Next Double click the Clear List Button and add the code below to it's event as before

http://www.iupui.edu/~stc/Train/Onco...s/VB/step4.gif

Running Your Program
The final step is running your program to ensure everything works.

On the top menu bar select Build --> Build Solution

You will be prompted to save your program select YES if you wish to do so.
Warning: DO NOT rename your form if prompted, it will display an error message!

If all these steps were followed your program should work as expected. If you encounter error messages you may need to go back through this tutorial and make sure you did not miss a step.

http://www.iupui.edu/~stc/Train/Onco...s/VB/final.gif

If everything works properly then Congratulations on Building your VB Program!!

Tutorial Written by:
Ryan Wischmeyer, 2003
Indianapolis, IN
__________________
~Ryan

rdove is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating Labels in VB patelk MS Technologies ( ASP, VB, C#, .NET ) 0 10-26-2004 10:06 AM
C++ combine with VB? john_tran MS Technologies ( ASP, VB, C#, .NET ) 4 10-21-2004 05:40 AM
VB or C#, or something else Apodysophilia MS Technologies ( ASP, VB, C#, .NET ) 6 10-15-2004 09:48 AM
Problems debugging visual c++ in vs.net 2003 Engineer MS Technologies ( ASP, VB, C#, .NET ) 2 07-20-2004 12:19 PM


All times are GMT -8. The time now is 03:51 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting