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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TRICKY! Determining control events at runtime...

Status
Not open for further replies.
Feb 28, 2001
1
AU
I'm writing an app that will add controls based on program settings within a setup file. Problem with working this way is I cant use event handling subs such as AButton_Click(), because it's impossible to know what controls will exist before I've compiled the program. What I want to know is if there's a way to determine if an event occured within my code (i.e If AButton = Clicked then... Of course <- that won't work). Is there any way of doing this????
 
It has been a while, but ...

I rember doing this by creating a control with the events precoded to call generic routnes with their names as arguments (e.g textboxa_OnClick calls textboxGenericClick(BoxName as String) with &quot;Me.Name&quot; as it's arg. All of the real code is in Public Function textboxGeneric(BoxName as String)

Think of this as the middleware part of a three tiered process.
MichaelRed
redmsp@erols.com

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top