Results 1 to 3 of 3

Thread: Help required with simple ActiveX control

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2005
    Posts
    3

    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

  2. #2
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    Re: Help required with simple ActiveX control

    Move your code to UserControl_Show
    Nobody knows what software they want until after you've delivered what they originally asked for.

    Don't solve problems which don't exist.

    "If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)

    2 idiots don't make a genius.

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2005
    Posts
    3

    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
    www.loial.co.uk

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width