Results 1 to 6 of 6

Thread: Buttons on activeX control

  1. #1

    Thread Starter
    Hyperactive Member Bananafish's Avatar
    Join Date
    Jan 2001
    Posts
    394

    Question Buttons on activeX control

    I apreciate that this is probably a very basic question - but if I want to design an activeX control that has buttons on it - how can I make the buttons work when the control is used on a form.

    at the moment clicking on them doesnt do anything...

  2. #2
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    In the usercontrol code, u raise an event when a button is clicked, then u can put u'r code in that event on the form.

    If that does not make sence, please let me know, and i can create a sample for u
    -= a peet post =-

  3. #3

    Thread Starter
    Hyperactive Member Bananafish's Avatar
    Join Date
    Jan 2001
    Posts
    394
    Thanks for that - I'll give it a try

  4. #4
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    ok,
    let me know how it goes
    -= a peet post =-

  5. #5

    Thread Starter
    Hyperactive Member Bananafish's Avatar
    Join Date
    Jan 2001
    Posts
    394

    Question

    That worked fine - thanks for your help

    I am however experiencing another problem with the activex control, in that when I add the ocx to my form and change the properties at design time, they always revert back to the default properties...

    any ideas?

  6. #6
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    u have to use property bags in order to save the settings I think.

    Tip:

    In the add-in manager, load the 'VB6 ActiveX Ctrl Interface Wizard'
    Then use this wizard to create a sample ocx. This way u can see how the property bag and the PropertyChanged Method is beeing used.

    hope that will help u getting started.
    -= a peet post =-

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