Dynamically generating One Activex control from Other ActiveX control on users form
Hello Everybody,
This is my first ActiveX control. I am desinging this control in VB6.0
I design 2 ActiveX Contrls One is Vertical Toolbar & second is Horizontal Toolbar.
I desing both of them. requirement of project is whenever user click on button of Vertical toolbar, Horizontal Toolbar will be created & displayed at position adjacent to clicked button.
(I think you got Problem Statement of project)
Now problem is whenever I am tying to create instance of my Horizontal Activex in Verical Activex control's Click event. Vb fired run time error on following SET statement
Public Withevents obj as HorizontalToolbar
Set obj = Controls.add("CntHori.TbrHorizontal","obj1")
Here CntHori is Lib name & TbrHorizontal is Control name.
Error name is ---> Obj not SET.
I try in this way assuming thta above code will create flyout Horizontal Toolbar on users form. Is there any different way to design flyout toolbar / control in VB.
Second Difficulty is when user move his form (during run time) how to get position of my placed Vertical Toolbar or user form's (Left,Top) so that i can move my flyout toolbar.
I think all of you get my difficulty.
If ther is any better way do this please tell me.
Your Suggetions Are most valueable for me. Deadline of project is 2 day only
Please Help Me.