Interface

ActionSource


Description

The ActionSource interface is implemented by Timer, DesktopBevelButton and DesktopButton. An ActionSource object calls the PerformAction method of each ActionNotificationReceiver registered with it.

Method descriptions


ActionSource.AddActionNotificationReceiver

AddActionNotificationReceiver(receiver As ActionNotificationReceiver)


ActionSource.RemoveActionNotificationReceiver

RemoveActionNotificationReceiver(receiver As ActionNotificationReceiver)

Unregisters an ActionNotificationReceiver.

Notes

If you implement this interface in your application, you must implement the methods with the parameters as shown here.

Sample code

If you want to have a Button call PerformAction on an ActionNotificationReceiver then you would create a new class (perhaps ActionNotificationTest) that implements ActionNotificationReceiver. In the PerformAction method, you add the code you want to run when the button is pressed (and before DesktopButton.Pressed event is called). For example:

MessageBox("PerformAction called.")

Now in the Opening event handler for a DesktopButton, you can add your receiver:

Var action As New ActionNotificationTest
Me.AddActionNotificationReceiver(action)

Compatibility

Project Types

Console, Desktop, Web

Operating Systems

All