Results 1 to 4 of 4

Thread: Capture events from runtime controls in a activex

  1. #1

    Thread Starter
    Hyperactive Member DarkX_Greece's Avatar
    Join Date
    Jan 2004
    Location
    Athens (Greece)
    Posts
    315

    Capture events from runtime controls in a activex

    Hello all,

    i am working on a activex that makes some runtime controls into it!
    Well i found the way to create them and then detroy them!

    Now can anyone help on how to capture their events?

    For example when i click the button with the name CMD23 a message appear telling me "You clicked CMD23"


    Short CV:
    1. Visual Basic 6 Programmer
    2. Web Expert


    Botonakis Web Services

  2. #2
    Member appdalesolution's Avatar
    Join Date
    Nov 2004
    Location
    London
    Posts
    37

    Re: Capture events from runtime controls in a activex

    ok ive never done this but have you tried decalring your control object using the WithEvents Keyword?

    i.e.

    Code:
    Dim WithEvents myControl As CommandButton
    
    Set myControl = Controls.Add("VB.CommandButton", "myControl")
    Then you should be able to access myControl from the object drop down box.
    Last edited by appdalesolution; Mar 17th, 2005 at 06:44 AM.
    Lee Dale
    http://www.appdalesolutions.co.uk
    Web Design, Database/Software Developement, Hardware Upgrades, Network design/maintenance.

  3. #3
    Member appdalesolution's Avatar
    Join Date
    Nov 2004
    Location
    London
    Posts
    37

    Re: Capture events from runtime controls in a activex

    Just tested this out and it works fine
    Lee Dale
    http://www.appdalesolutions.co.uk
    Web Design, Database/Software Developement, Hardware Upgrades, Network design/maintenance.

  4. #4

    Thread Starter
    Hyperactive Member DarkX_Greece's Avatar
    Join Date
    Jan 2004
    Location
    Athens (Greece)
    Posts
    315

    Re: Capture events from runtime controls in a activex

    Thanks appdalesolution! I tried and worked!
    Short CV:
    1. Visual Basic 6 Programmer
    2. Web Expert


    Botonakis Web Services

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