

| Type | Description | |||
| Boolean | A boolean expression that indicates whether the control fires the Click event when user changes the selection. |
The following VB sample displays the selected value as soon as the user selects a new item ( the FireClickOnSelect property is True ):
Private Sub ComboBox1_Click()
Debug.Print ComboBox1.Value
End Sub
The following C++ sample displays the selected value as soon as the user selects a new item ( the FireClickOnSelect property is True ):
void OnClickCombobox1()
{
OutputDebugString( V2S( &m_combobox.GetValue() ) );
}
where the V2S function converts a VARIANT value to a string expression,
static CString V2S( VARIANT* pv, LPCTSTR szDefault = _T("") )
{
if ( pv )
{
if ( pv->vt == VT_ERROR )
return szDefault;
COleVariant vt;
vt.ChangeType( VT_BSTR, pv );
return V_BSTR( &vt );
}
return szDefault;
}
The following VB.NET sample displays the selected value as soon as the user selects a new item ( the FireClickOnSelect property is True ):
Private Sub AxComboBox1_ClickEvent(ByVal sender As Object, ByVal e As System.EventArgs) Handles AxComboBox1.ClickEvent
Debug.WriteLine(AxComboBox1.Value)
End Sub
The following C# sample displays the selected value as soon as the user selects a new item ( the FireClickOnSelect property is True ):
private void axComboBox1_ClickEvent(object sender, EventArgs e)
{
System.Diagnostics.Debug.WriteLine(axComboBox1.Value.ToString());
}
The following VFP sample displays the selected value as soon as the user selects a new item ( the FireClickOnSelect property is True ):
*** ActiveX Control Event *** wait window nowait thisform.ComboBox1.Object.Value