Help required with simple ActiveX control
I have been tearing my hair out trying to create a very simple VB6 active X control that will display forms correctly. I want user_control initialise to display a form. That form contains a a command button that displays a second form with a text box on it. Whilst everything works in my VB Project, when I try and run it standalone, using the html generated by the package and deployment wizard, I get problems with the forms. For example :
1. Nothing displays unless I have another IE Explorer window running.
2. When a form is displayed the form is hidden or displayed in anothet IE window
3. The form is disabled so I cannot click on any command button, text box etc.
Does anyone have a simple VB ActiveX control that displayes forms AND that works correctly?
IE version is 6.
Yours in desperation....
JL
www.loial.co.uk
Re: Help required with simple ActiveX control
Move your code to UserControl_Show
Re: Help required with simple ActiveX control
Thanks, I have tried that but now when I run it in IE(using the HTML created by the deplayment wizard), I cannot click on the command button. Works fine in the VB IDE
Here is the code
Private Sub UserControl_Show()
Load Form1
SetParent Form1.hWnd, UserControl.hWnd
Form1.Show vbModal
End Sub
' Form 1 contains a command button
Private Sub Command1_Click()
Load Form2
SetParent Form2.hWnd, Form1.hWnd
Form2.Show vbModal
End Sub
Private Sub Form_Load()
End Sub
' Form 2 just contains a text box