Parameters
Passes event-related information as an optional parameter to the Event handler (OnClick handler). The bqoEvent has two properties: ClickX and ClickY. When the OnClient event occurs, the event handler has access to the event related information needed to process it. For example, the event might require the position of the mouse cursor for a picture, OnClick event, or information about which table column was clicked for a table embedded section object. If ClickX and ClickY values cannot be read, 0 is returned.
This example shows to read the values on different sectors of a picture on an OnClick Event. Values are written to the Console:
TBConsole.Text = TBConsole.Text + "\r\nPic1 Start"
TBConsole.Text = TBConsole.Text + "\r\nXCoord: " + bqoEvent.ClickX
TBConsole.Text = TBConsole.Text + "\r\nYCoord: " + bqoEvent.ClickY
if (bqoEvent.ClickX > 390 && bqoEvent.ClickX < 480 && bqoEvent.ClickY >280 && bqoEvent.ClickY <425)
{
TBConsole.Text = TBConsole.Text + "\r\nFront Wheel"
}
else
{
TBConsole.Text = TBConsole.Text + "\r\nNot a Wheel"
}
TBConsole.Text = TBConsole.Text + "\r\nXCoord: " + bqoEvent.ClickX
TBConsole.Text = TBConsole.Text + "\r\nYCoord: " + bqoEvent.ClickY
bqoEvent.ClickX = bqoEvent.ClickX - 50
bqoEvent.ClickY = bqoEvent.ClickY + 50
TBConsole.Text = TBConsole.Text + "\r\nXCoord: " + bqoEvent.ClickX
TBConsole.Text = TBConsole.Text + "\r\nYCoord: " + bqoEvent.ClickY
Picture2.OnClick(bqoEvent)
TBConsole.Text = TBConsole.Text + "\r\nPic1 End"