Theos PowerBasic Museum 2017

Webmaster: José Roca (PBWIN 10+/PBCC 6+) (SDK Forum) => COM Programming => Topic started by: Wilko Verweij on November 18, 2012, 07:32:21 PM

Title: form with two controls
Post by: Wilko Verweij on November 18, 2012, 07:32:21 PM
Hi,
I have a (probably stupid) question. I created a form in Firefly with two copies of one OCX-control. I can set properties of the controls and detect events. Like this:
Method Click <-600>

  MsgBox "click event works!"

End Method

However, when an event is fired, how I can detect which of the two copies is responsible?
Wilko
Title: Re: form with two controls
Post by: José Roca on November 18, 2012, 08:53:00 PM
Use a different event class for each instance of the control.
Title: Re: form with two controls
Post by: Wilko Verweij on November 19, 2012, 08:50:53 PM
Thank you, José, that did it.
Wilko