Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Someone please explain the basics of VB [closed]

Tags:

vb.net

I need help with the very basic understanding in plain English for instance :

Private Sub Label1_Click(sender As Object, e As EventArgs) Handles Label1.Click

I read this as:

Private      (not to be shared or changed) 
Sub          (declares a class) 
Label1       (is the object) 
_            ( I have no idea what the underscore means) 
Click        ( is the event to trigger the object) 
Sender       (The user who clicks the object) 
As           (???? What is this) 
Object       (object)
,            (end of event)
e            ( ?? have no idea) AS (??) 
EventArgs    (?? Not sure) 
Handles      ( i Would assume that has to do with EventArgs) 
Label1.Click (click button).

I have read through a lot of books and forums and I just do not get it, I see other people have ask question and get replies like go back and read book, I have tried that.

I need some one that is kind enough to answer these simple question when they come up. Sure I can copy code and create what others have done but the simple core understanding,,, I need help with, any body out there want to help me as these question come up? I have read MSDN forums but again I just do not get it.

Please help me to understand.

Thanks Robert

like image 910
user3371628 Avatar asked Nov 30 '25 20:11

user3371628


1 Answers

It means:

Private      (this method can only be seen in this class) 
Sub          (declares a method without a return value) 
Label1_Click (is the name of the method - the parts are not significant) 
Sender       (The object that raised this event) 
As           (keyword used when declaring the variables and its type) 
Object       (the type of the sender)
,            (separator between parameters)
e            (the object that holds the event values)
EventArgs    (the type of the event values) 
Handles      (Declares that this method is an event handler) 
Label1       (The object that the event is handled from)
.            (The member accessor)
Click        (The event that is handled).
like image 160
Enigmativity Avatar answered Dec 04 '25 00:12

Enigmativity



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!