Need event Help Please

Soundmaster

New member
Joined
Mar 8, 2008
Messages
2
Programming Experience
Beginner
Hello,

I'm new to vb.net and i have a problem.

I have created a form (form1) with 2 buttons
If i press button1 then it opens another form (Form2) With a button called Go
If i press Button2 then it opens also the form (Form2) with off course the same button called Go

I want to trigger a event on the button [Go] based on what is pressed in Form1 and witch button is selected

so i like to do this:

Action:
Form1>Button1>Form2>Button Go>Event x
and
Form1>Button1>Forum2>Button Go>Event y

So i have serveral events on the button [Go] and it triggers the events based om the previous form called on the button.

I think i have to do this with a Class and then inherits but i don't know how to do this. Can someone give me an example how to do this. Please Help.

Many thanks
A desperate "Beginner of vb.net" :(
 
Oop

Thank you for the reply,

I checked out the link you described and i downloaded the samples and as i Run these examples i get a Console that pops up and then closes again without given me any information of reference what to press to see the result?

I See the code in the classes but i want to see the result so i can understand it.

Is there a sample somewhere without the use of the console but for instence a msgbox ?

Also in the example there is no use of forms only the class

I think i need to lock into the OOP Object programming?
 
Yeah, you need to read up a little more about OOP. I didn't actually read that article but I know it deals with delegates a bit. The concept is pretty simple really. You set up a delegate which will call a function. From button1 you tell it to call functionx and from button2 you tell it to call functiony. In your form2 you have your button call the delegate and it will call the appropriate function.
 
Back
Top