Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 189
  • Last Modified:

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.

Thanks.
0
Sparky191
Asked:
Sparky191
  • 3
  • 3
1 Solution
 
fds_fatboyCommented:
Exactly how are you passing the parameters? How exactly does the control receive the parameters?

Have you got code samples?
0
 
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.
0
 
fds_fatboyCommented:
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.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
Sparky191Author Commented:
ReadProperties of the OCX.
0
 
fds_fatboyCommented:
Can you post code? The OCX code that is.
0
 
Sparky191Author Commented:
No can't do that sorry. Its probably my logic.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now