hi...
i would like to ask im using vs 2010...and i would like to create a vb.net with it...
i have google everything n everywhere about this one particular thing...

i create my project as below

open vs 2010 > new project > i choose windows form application(as shown on print screen)

gila

then... when i double click my form...it shows this code...(as shown on print screen)....

gila4

my confusion is.....

my code suppose to show like (vb.net) (as shown on print screen) (i took the pix in the youtube..sorry could not find a better image..)

gila48

my code is missing the [by val]...how am i suppose to change it...it suppose to be automatic right...

just put ByVal before sender.. ^_^

ermm...is the [by val] will make any difference?? hohohho...

When a paramer is passed By Val then the sub/function gets a copy of the parameter.Any changes made inside the sub/function will not affect the original parameter. However, if you pass By Ref then any changes will affect the calling parameter. For example

Dim x As Integer = 5
MySub(x)
MsgBox(x)


Private Sub MySub(ByVal p As Integer)
    p += 1
End Sub

will display the value 5, but

Dim x As Integer = 5
MySub(x)
MsgBox(x)


Private Sub MySub(ByRef p As Integer)
    p += 1
End Sub

will display the value 6

The ommision of ByVal is a non-optional "feature" MS added in VB2010 SP1. ByVal is the default parameter passage mechanism in .Net. Supposedly MS originally used the placement of ByVal as a reminder for those migrating from VB6 where ByRef is default.

hhohoho.....ok2..i will try to reinstalling it...by the way thanzzz all 4 the reply n for the xplanation...

yup...i need to reinstall my vs hehehe...thank you all for the responses.. ^^,

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.