Handle events

'--------------------------------------------------------------------
' Visual Basic 6 - Event handler by example of CTS signal
'--------------------------------------------------------------------
On Error GoTo ErrorHandler
	If FTSPCControl1.Cts = True Then

		'Todo: add your code

	End If
	Exit Sub

ErrorHandler:
	Dim err_code As Integer
	err_code = FTSPCControl1.GetLastError
	MsgBox "ErrorCode = " & CStr(err_code) & " - " & Err.Description, _
		vbCritical, "Error!"


/////////////////////////////////////////////////////////////////////
// C++ Example - Event handler by example of CTS signal
/////////////////////////////////////////////////////////////////////
void CSPCDemoDlg::OnCtsFtspccontrol1()
{
	try
	{
		BOOL State = m_SPCControl1.get_Cts();
		if (State)
		{
			// Todo: add your code
		}
	}
	catch(COleDispatchException* E)
	{
		MessageBox(E->m_strDescription, mbCaption, 
			MB_OK | MB_ICONERROR);
	}
}