Open/Load events on programmatically opened forms

S

sparkane

I have a class that opens a form for user input. The class declares the
form object with WithEvents, and form event code is in the class. I
read elsewhere on the web that the events must be bound with code, a la

Form.OnActivate = "[Event Procedure]"

for the event handlers in the class to be called. I've done this and it
works for me. However: I've found that you can't bind events before the
form object is instantiated (raises an error, as you'd expect), and when
you instantiate the form object, Open and Load are immediately
triggered, before any handlers for those events can be bound.

My question is: is there a sneaky way to get handlers for those events
bound?

thanks in advance
spark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top