Code

03/19/2013 19:52 thankx#1
Hello Community..
could some one describe this code for me please?
Code:
Private Sub Button1_Click (ByVal sender As System.Object, ByVal
Dim U_Name As String
Dim U_B_D As Date
Dim U_Gender As Boolean
Dim U_C_F As Integer

U_Name=TextBox1.Text
U_B_D=TextBox2.Text
If RadioButton1 .Checked = True then
     U_Gender = Truse
End If
If RadioButton1 .Checked = False Then
     U_Gender = False
End If
U_C_F = TextBox3 .Text
Me.Label5 . Text = U_Name & vbCrLf & U_B_D &vbCrLf & U_Gender & vbCrLf & U_C_F
hope anyone can describe for me word by word
thankx
03/19/2013 20:55 pleaX#2
You've 3 Textboxes where you can write something, a radiobox and a button.
U_Name is a string, U_B_D is a date value, U_Gender is a bool(only true/false) and a U_C_F int value.

This whole thing is a function which gets called if you click on button1.
U_name gets the text from textbox1, u_b_d from textbox2, if radiobox is true then u_gender gets true else false, u_c_f gets the value from textbox3.
Then you've a label(output text) it gets these(U_Name & vbCrLf & U_B_D &vbCrLf & U_Gender & vbCrLf & U_C_F) values, I guess as a string.

I think this is Visual basic code...sorry I've never worked with it...
03/19/2013 21:02 thankx#3
Quote:
Originally Posted by pleaX View Post
You've 3 Textboxes where you can write something, a radiobox and a button.
U_Name is a string, U_B_D is a date value, U_Gender is a bool(only true/false) and a U_C_F int value.

This whole thing is a function which gets called if you click on button1.
U_name gets the text from textbox1, u_b_d from textbox2, if radiobox is true then u_gender gets true else false, u_c_f gets the value from textbox3.
Then you've a label(output text) it gets these(U_Name & vbCrLf & U_B_D &vbCrLf & U_Gender & vbCrLf & U_C_F) values, I guess as a string.

I think this is Visual basic code...sorry I've never worked with it...
ye its Visual basic code and i would like to know what (By Val) mean or do and what ( ByVal sender As System ) mean or do too..
03/20/2013 12:24 pleaX#4
Private Sub Button1_Click (ByVal sender As System.Object, ByVal
This function gets execute by the callback of Button1.
sender is just the sender :P ByVal is the valuetype as System.Object I'd guess.
For this kind of questions you should read a book for Visual basic... just from looking at a language you won't learn it...