VB6, ActiveX controls

I'm trying to debug a simple ActiveX OCX. I have opened the project, and added a form to which I've added the OCX project as a control. The problem is that the OCX initialises before the form does, thus any parameters I send in from the form aren't sent in until after the control is loaded. On the web page this is fine as the params are sent in by the object tag in the asp. I was wondering is there a way to make the form load first and if thats the right way to do this.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Exactly how are you passing the parameters? How exactly does the control receive the parameters?

Have you got code samples?
Sparky191Author Commented:
I'm using a property bag in the OCX.

What seems to happen is that at runtime the OCX initialises, then the form loads, passes params. Then when you run the  OCX by clicking the buttons on the control, it reads in the params at that point.

So when the OCX intialises theres params set for it. Depending on these its sets labels oon the OCX form. (not the VB container form)

Maybe its a problem of program logic than anything else. I'm new to using ActiveX controls.
Are you reading the property bag in the ReadProperties event or the InitProperties event?
My guess - it is the latter, but should be the former.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Sparky191Author Commented:
ReadProperties of the OCX.
Can you post code? The OCX code that is.
Sparky191Author Commented:
No can't do that sorry. Its probably my logic.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.