Lost Password?

Go Back   CodeCall Programming Forum > Software Development > Tutorials > VB Tutorials

Unregistered, Check out the Coder Battles in the Announcement and Game forums.

VB Tutorials Visual Basic Tutorials and Code

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-14-2007, 02:29 AM
travy92's Avatar   
travy92 travy92 is offline
Learning Programmer
 
Join Date: Sep 2007
Location: Australia
Age: 15
Posts: 72
Credits: 10
Rep Power: 5
travy92 is on a distinguished road
Send a message via MSN to travy92
Post Tutorial - Shapes+OptionBoxes

INTRO:

In this tutorial we'll be learning how to make a shape change using a few Option Boxes.

------------------------------------------------------------------

GUI (LAYOUT):

Here is my GUI:


------------------------------------------------------------------

WHAT YOU NEED:

6 Option Buttons with:

#1 Option Button:
Name: Option1
Caption: Rectangle

#2 Option Button:
Name: Option2
Caption: Square

#3 Option Button:
Name: Option3
Caption: Oval

#4 Option Button:
Name: Option4
Caption: Circle

#5 Option Button:
Name: Option5
Caption: Rounded

#6 Option Button:
Name: Option6
Caption: Rounded2

1 Shape with:
Name: Shape1
Caption: (None)

----------------------------------------------------------------

CODE:

Quote:
Private Sub Option1_Click()
Shape1.Shape = 0
End Sub

Private Sub Option2_Click()
Shape1.Shape = 1
End Sub

Private Sub Option3_Click()
Shape1.Shape = 2
End Sub

Private Sub Option4_Click()
Shape1.Shape = 3
End Sub

Private Sub Option5_Click()
Shape1.Shape = 4
End Sub

Private Sub Option6_Click()
Shape1.Shape = 5
End Sub
The explanation is below.

----------------------------------------------------------------

CODE EXPLANATION:

Quote:
Private Sub Option1_Click()
Shape1.Shape = 0
End Sub
This tells VB to change Shape1 (Our shape) into the shape specified. All the other codes have the EXACT same explanation!

REMEMBER: These are the values for each shape (Shape = ? - ? for the value for the shape)

Rectangle = 0
Square = 1
Oval = 2
Circle = 3
Rounded = 4
Rounded2 = 5

----------------------------------------------------------------

Thanks to TheComputerMaster/Tcm9669 for the screenshot program.

Special thanks to the readers (YOU).

Made by me, Travy92.

SAMPLES:
Attached Files
File Type: rar ShapeChanger.rar (2.8 KB, 6 views)
File Type: zip ShapeChanger.zip (3.0 KB, 3 views)
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Last edited by Jordan; 09-18-2007 at 07:30 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tutorial: C# Hello World Jordan CSharp Tutorials 13 06-26-2008 08:57 AM
John's Java Tutorial Index John Java Tutorials 0 01-11-2007 03:05 PM
Tutorial to Remove the Virus "Trojan horse Startpage.ADE" clookid Tutorials 9 01-09-2007 09:39 PM
JSP Tutorial encoder JavaScript and CSS 0 05-26-2006 05:31 AM


All times are GMT -5. The time now is 04:47 AM.

Contest Stats

Xav ........ 1024.41
MeTh0Dz|Reb0rn ........ 974.08
morefood2001 ........ 850.04
John ........ 841.93
WingedPanther ........ 661.52
marwex89 ........ 575.59
Brandon W ........ 456.18
chili5 ........ 292.12
orjan ........ 187.41
Steve.L ........ 181.88

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 79%

Ads