Results 1 to 2 of 2

Thread: Public events in diy ocx

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2001
    Location
    Dover, UK
    Posts
    70

    Public events in diy ocx

    If i were to make an ocx with several command buttons, and place the ocx on a vb form, how would the form "know" which particular button on the ocx had been pressed?

    Sure, its easy to use the GotFocus and LostFocus events to know if the WHOLE ocx on the form has been clicked, but i really need to know
    which command button was pushed for my program.

    Similarly, if a condition is met in the ocx (like x=y), how can i make that raise an event that can be seen by the form other than Public declaring a boolean that changes in the ocx???


    God, there really are more questions than answers, but I know you wont let me down. At least I hope you won`t.!

    Thanks

  2. #2
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Smile RaiseEvent

    You can raise custom events from activex component projects (dll, ocx and exe) by using the RaiseEvent function.

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