|
-
Jun 8th, 2002, 07:27 AM
#1
Thread Starter
Junior Member
calling a sub
hello:
i have a sub:
Private Sub CmdTrack0_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdTrack0.Click
TrackNum = 0
CmdTrack0.ImageIndex = 3
End Sub
all i want is to call the sub from another place,
if it was VB6, I'd write:
CmdTrack0_click()
but it doesn't work with vb.net!
please help me....
-
Jun 8th, 2002, 09:04 AM
#2
Put the code in a different sub, and call it from your buttons click event, and from wherever you want.
Although I used to call an eventhandler once in a while myselve, I don't see it as good coding practice. Well, maybe .NET will force us to get rid of these habbits.
-
Jun 8th, 2002, 09:25 AM
#3
Thread Starter
Junior Member
I guess so...
-
Jun 8th, 2002, 11:23 AM
#4
Addicted Member
In your call statement CmdTrack0_click() , there aren't any parameters.
You could try CmdTrack0_click(Nothing, Nothing) or whatever you decide the parameters should be.
That which does not kill us, only makes us stronger. 
-
Jun 8th, 2002, 11:39 AM
#5
Thread Starter
Junior Member
nothing hhhaaa?
i tried null, void, zero, 0, -1 and a few others
but i didn't try NOTHING!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|