First, ByVal and ByRef mean "by value" and "by reference". Since everything
you do on a computer is in memory, something things just want a "pointer" to
the memory location where you data is. Some want the actual data itself.
There are advantages to both.
A ByVal parameter makes a copy of the value, whereas ByRef passes the
pointer to the memory address. Therefore, if a parameter is passed ByRef and
you change it's value in your function, it changes for the caller too -
because you were both pointing at the same memory location.
If a parameter is passed in ByVal, then you have a copy of it. If you make
changes inside your function, then it leaves the orginal alone - because you
have a seperate copy.
"sender" is a generic reference to which object kicked off the event that
you are in. You may just want to know, who fired the event. "EventArgs" are
arguments that go along with that event. Those both become more meaningful
when you use an object like a treeview - where the sender is the node that
was clicked, etc..
hth
"Maurice Walmsley" <mb********@hotmail.com> wrote in message
news:92**************************@posting.google.c om...
I'll avoid tell you how lame I am and get straight to the question...
I need a good expanation to the "ByVal sender As Object, ByVal e As
System.EventArgs" part of;
Public Sub button01_click(ByVal sender As Object, ByVal e As
System.EventArgs)
I dont understand any of that part. ByVal? sender? e?
System.EventArgs? Do you know of any good references explaining what
this stuff is? I'm sure it's different for each routine, and I
obviously need to learn...
cheers and thanks
m