Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 02-13-2007, 08:18 AM   #1 (permalink)
 
Newb Techie

Join Date: Feb 2007

Posts: 2

Ajwad

Default Help me plzz

Private Sub Command1_Click()
Dim no As Integer

No = Val(Text1.Text)
Picture1.Cls
Picture1.Print no^2
End Sub


can any one tell me the function of this by line

Private Sub Command1_Click() - ???
Dim no As Integer - ???
No = Val(Text1.Text) - ???
Picture1.Cls - ???
Picture1.Print no^2 - ???
End Sub - ??
Ajwad is offline  
Old 02-13-2007, 10:34 AM   #2 (permalink)
 
Newb Techie

Join Date: Feb 2007

Posts: 6

Insomniac

Default

If im reading it correctly its VB to start and this is what happens when command1 gets clicked by the user.

Dim no As Integer creates an integer value called no

No = Val(Text1.Text) shouldnt actually work unless there is a variable declared elsewhere called No, if it were no however it was said it to the value of whatever is in text1 (a textbox) and in case its non number it is type cast to a number

picture1.Cls - clears picture one

picture1.Print no^2 rights the value of the user entered number to the power of 2 on the picture

end sub ends the little routine so anything after the line is not part of what happens when command 1 is clicked
Insomniac is offline  
Old 02-13-2007, 11:26 AM   #3 (permalink)
 
Newb Techie

Join Date: Feb 2007

Posts: 2

Ajwad

Default

thanks man!!
Ajwad is offline  
 
Closed Thread

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