By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 941 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

using .NET Control in vb 6.0

P: 53
Hi All,

I am having a .Net ActiveX control which can be used in vb 6.0.
I opened a new VB 6.0 StandardEXE project, i have given the Reference to that
Control.tlb file, and components i have selected that control . The control is added to tool box. Then Select the control, drag and drop on the VB 6.0 Form. Run the application.. the .Net control is working fine.

When the VB 6.0 application starts running, it is calling the .Net Constructor. In the .NET constructor, i am displaying a message like "Loading the Control..Please wait...". It is displaying.

The problem is when i close the VB 6. 0 Form, again the message is getting displayed as the .Net Constructor is calling again, This should not happen.
Here again why the .Net Constuctor is getting called ??

If i load the .NET control at runtime , in VB 6.0 Form load event, it is workin g fine, it is not displaying the message at the time of closing the form.

Why only at Design Time??? any suggessions please...
Apr 21 '08 #1
Share this Question
Share on Google+
4 Replies


debasisdas
Expert 5K+
P: 8,127
That depends on what is defined in the component .
Apr 21 '08 #2

P: 53
DKn
Hi thanks for your replay...

The .Net control is not having any exposed methods. only having the public constructor...
and the class interface type is ClassInterfaceType.AutoDual, no interface.

ok. can we avoid this displaying message at the time of closing the vb 6.0 form in Form unload event?


That depends on what is defined in the component .
Apr 21 '08 #3

debasisdas
Expert 5K+
P: 8,127
Is there any reference of the component in the form unload event ?
Apr 21 '08 #4

P: 53
DKn
Is there any reference of the component in the form unload event ?
No..in the code part of VB 6.0 i am not doing any thing.
At design time just adding that control to the VB 6.0 Form.
Apr 21 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.