• Welcome to Theos PowerBasic Museum 2017.

form with two controls

Started by Wilko Verweij, November 18, 2012, 07:32:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Wilko Verweij

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

José Roca

Use a different event class for each instance of the control.

Wilko Verweij

Thank you, José, that did it.
Wilko