using .NET Control in vb 6.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DKn
    New Member
    • Aug 2007
    • 53

    using .NET Control in vb 6.0

    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...
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    That depends on what is defined in the component .

    Comment

    • DKn
      New Member
      • Aug 2007
      • 53

      #3
      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 ClassInterfaceT ype.AutoDual, no interface.

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


      Originally posted by debasisdas
      That depends on what is defined in the component .

      Comment

      • debasisdas
        Recognized Expert Expert
        • Dec 2006
        • 8119

        #4
        Is there any reference of the component in the form unload event ?

        Comment

        • DKn
          New Member
          • Aug 2007
          • 53

          #5
          Originally posted by debasisdas
          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.

          Comment

          Working...