FONTS GDE GOOGLE HOME LINKS MAPS MICROWORLDS TD702 TIMETABLES TJ501 TJ521 TJ591 TJ641 TJ828 TJ853 TUTORIALS

Home > Tutorials > Visual Basic > Visual Baisc 6.0 Examples

Visual Baisc 6.0 Examples

helloworldsetup.zip 1,330KB Ziped with Winzip  from www.winzip.com use winzip to unzip

Private Sub cmdHello_Click()
    ' ----- change the caption
    lblHelloWorld.Caption = "Hello world"
End Sub


Private Sub cmdClear_Click()
    ' ----- clear the caption  
    lblHelloWorld.Caption = ""
End Sub
Private Sub cmdAbout_Click()
    ' ----- display the About Window
    frmAbout.Show
End Sub  


Private Sub cmdOk_Click()
    ' ----- End the program
    Unload frmHelloWorld
    End
End Sub

ForNextLoopPackage.zip 3,073KB Ziped with Winzip  from www.winzip.com use winzip to unzip

February 14, 2004

Private Sub cmdForNextLoop_Click()
' ----- Use a For Next Loop to
'      
Count from 0 to 10
    Dim x As Integer
    Cls
    For x = 0 To 10
        
Print x
    
Next x
End Sub

area.zip 8KB Ziped with Winzip  from www.winzip.com use winzip to unzip

Private Sub cmdClear_Click()
    ' ----- set the text to nothing
    txtRadius = ""
    ' ----- set the focus to radius box
    txtRadius.SetFocus
EndSub


Private Sub txtRadius_Change()
    ' ----- When the value changes
    '       calculate and display the area

    Dim sngRadius As Single
   
Dim sngArea As Single
    sngRadius = Val(txtRadius.Text)
    sngArea = 3.14159265 * sngRadius ^ 2
    lblArea.Caption = Str(sngArea)

End Sub


APA citation:
Russell, R. (2004, February 13). Visual basic 6.0 examples
     Retrieved February 10, 2004, from
     http://www.rupert.id.au/vb/examples/index.html