|
-
May 29th, 2000, 11:44 AM
#1
Thread Starter
New Member
Let me put the problem with one simple example.
I have a form 'Form1' with two controls, one text box control 'Text1' and a command button 'Command1'. I have a method :
Sub TrapEvent()
' need to find which event is to occur, and for what
' object: Text1, Command1 or Form1
End sub
As we know each object has its own set of events, here the case with Text1 and Command1. Lets take simple Click events :
Sub Text1_Click()
' some statements
End Sub
Sub Command1_Click()
' some statements
End Sub
Now When Command1 is clicked, Command1_Click() event will be triggered and when Text1 is clicked Text1_Click event will be triggered. What I need now is on whatever object(Text1, Command1, Form1) I clicked, my TrapEvent() method should be executed before executing the _Click event of the corresponding controls and thereby I should be able to determine which event ('Click' in this case) is occured and for what control object.
This is the problem. So all the VB experts are requested to give its solution.
Thank you all.
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
|