Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

terminating an event

Status
Not open for further replies.

wuxapian

Programmer
Jun 13, 2001
52
0
0
GB
Hi all,

Does anyone know if it is possible to terminate an event from within the event handler.

My problem is this, I have a class that handles the onClick event of a tab control within a form but I also have the same event within the form itself to handle specific items relating to the tab control before the class event kicks in.

What I want to do is check certain things within the form event handler before it falls through to the (overloaded) class event handler. If certain criteria are not met within this event handler I want to stop it going to the overloaded handler. So basically is there a way to stop the second handler kicking in?

TIA
Wux.
 
I'm not sure if you want to try this but why not have a flag variable in your class and make it public and if it gets to a certain point you set it otherwise you leave it at 0 and then when your running the overloaded event at the very start of it check the flag and if it's not set then exit Sub.

Mark

The key to immortality is to make a big impression in this life!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top