Results 1 to 2 of 2

Thread: ActiveX Controls - Working with Properties

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2000
    Posts
    98

    Wink ActiveX Controls - Working with Properties

    This might sound like a stupid question but lets say that I have created an ActiveX control in Visual Basic and I add the control to an html document. On my control I have a command button and a text box.

    My question is: Is it possible to write vbscript for the command button on the ActiveX control? Say for example: I want to click on it (on Click) and then another html page will be displayed. How can I do this?

    Second question is: When The ActiveX control is running and i type data into the text box on the Control, can I take this text box info from the Active X control and pass it onto the db using asp?

    If so can you display an example.

    Help is greatly appreciated!
    Stevie

  2. #2
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    Ok.... first off, let me say that I would not bother using an ActiveX control for what you have described. You can accomplish the same thing with simple HTML controls and the page will be compatible with all browsers and much lighter.

    That said, you can interact with the activeX control in client side script. The control is downloaded and registered on the users PC through the browser and will be displayed and instantiated there. BUT you have to have created public events and methods that allow access to the events on the controls that make up your ActiveX control when you are coding the control itself in VB6.

    You pass values from an ActiveX control by putting code into a onsubmit() client side event function that copied the data from the ActiveX control into a hidden textbox that is inside of a HTML form. The data will be passed when the form is submitted to the next page and the server side code can do whatever with it.

    ActiveX controls give the page a real application feel, but at a cost. Higher overhead and restriction to IE as a browser (Which in itself is not an issue if your developing for an Intranet where the browser type and version is more controlled.)
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

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