Kin Fat SZE
asked on
vb.net call a sub
Hi,
in some of process
.......
.......
ListCom_SelectedIndexChang ed
How could I call a sub ListCom_SelectedIndexChang ed without arg eventSender , eventArgs ?
Thank you!
Francis SZE
in some of process
.......
.......
ListCom_SelectedIndexChang
How could I call a sub ListCom_SelectedIndexChang
Thank you!
Francis SZE
Private Sub ListCom_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles ListCom.SelectedIndexChanged
rsCusObj.MoveFirst()
rsCusObj.Move((ListCom.SelectedIndex))
loadRecordSet()
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
hi
I want given with System.Object, ByVal eventArgs As System.EventArgs
it works on
Call ListCom_SelectedIndexChang ed(ListCom , Nothing)
How about eventargs? I want a event "onclick"....
Could you help?
Thank you!
Francis SZE
I want given with System.Object, ByVal eventArgs As System.EventArgs
it works on
Call ListCom_SelectedIndexChang
How about eventargs? I want a event "onclick"....
Could you help?
Thank you!
Francis SZE
ASKER
hi,
I want to passing onclick event to second parameter on ListCom_SelectedIndexChang ed sub
Call ListCom_SelectedIndexChang ed(ListCom , ??)
anybody could help?
I want to passing onclick event to second parameter on ListCom_SelectedIndexChang
Call ListCom_SelectedIndexChang
anybody could help?
Yo can do this way, but you can't pass an onclick event.
Dim e As New System.EventArgs()
Call ListCom_SelectedIndexChang ed(ListCom , e)
Why do you need "e" to be a real argument?
Yo can pass nothing instead.
Can you explain what do you want to achieve?
Dim e As New System.EventArgs()
Call ListCom_SelectedIndexChang
Why do you need "e" to be a real argument?
Yo can pass nothing instead.
Can you explain what do you want to achieve?
if you can post more code to highlight what you are trying to achieve someone may point you in the right direction. As it stands, you are asking us to look for "something" that you can't find in the proverbial haystack!
ASKER
I want to know how to pass eventargs to sub ListCom_SelectedIndexChang ed in the case what I need .
You CAN NOT!
you can call it this way
Dim e As New System.EventArgs()
Call ListCom_SelectedIndexChang ed(ListCom , e)
But you can't define "e" as a onclick event becuse events are generated by the system.
For the piece of code you pasted on the question, you don't need this event to be initialized, so if you pass "nothing" will work fine
Dim e As New System.EventArgs()
Call ListCom_SelectedIndexChang
But you can't define "e" as a onclick event becuse events are generated by the system.
For the piece of code you pasted on the question, you don't need this event to be initialized, so if you pass "nothing" will work fine
ASKER
.
if it is a combobox, determine the index of the currently selected value and select another index in the list. That should fire off the selectedIndexChanged event