WireLess Studio Widgets Developer's Guide
WSWDG ContentsWStForm class reference

GetLastEventSourceId

Call this method to retrieve the id of the widget that triggered the last event.

Ole declaration

SHORT GetLastEventSourceId(void);

Parameters
Return Value

GetLastEventSourceId returns the name of the widget that triggered the last event. If no events has been received, GetLastEventSourceName returns -1.

Remarks
Example
C#
using WirelessStudioOleWidgets;
WStFactory oFactory = new WStFactory();
WStForm oForm = new WStForm ();
short formId = 10;
short radioButtonId = 15;
oFactory.CreateFormById(formId);
oFactory.CreateWidgetById((short)WSTFactoryConstants.WS_RADIO_BUTTON, radioButtonId, "", 15, 15, 30, 30, "Radio Button 1");
oForm.AddObjectBydId(formId, radioButtonId);
oForm.ShowById(formId, true, true);

short objectId = 0;
if( oForm.GetEvent() )
{
	objectId = oForm.GetLastEventSourceId();
}
Visual Basic 6
Public wsForm As New WStForm
...
Dim objectId as Integer

bResult = wsForm.GetEvent()
objectId = wsForm.GetLastEventSourceId()
...
See also

GetEvent | GetLastEventStrValue | GetLastEventSourceId | GetLastEventIntValue | GetLastEventType

WStWiget class reference | WStForm class reference | WStFactory class reference | WStError class reference