I want to Show "ToolTips" when radioButton4 is Checked and when you Hover the mouse over textBox2.

This works as expected. Now when I Check the radioButton5 wich makes the radioButton4 UnChecked I dont want the ToolTips to be seen when Hover the mouse over textBox2.

I am trying to make that rule with the code below but the ToolTips is shown anyway. Have I missed something out because I do make the check:
if( radioButton4->Checked ) etc.. ?

private: System::Void textBox2_MouseHover(System::Object^  sender, System::EventArgs^  e) 
{

    if( radioButton4->Checked ) //Also tried: radioButton4->Checked == true
   {
       toolTip1->SetToolTip( this->textBox2, "Hello" );
   }

}

Try this->radiobutton4->Checked although it should work without.
I have the effect you want if I Hover VERY slowly over the control.

try

//----------------------------------------------------------------------------
//...
private: System::Int32 m_x, m_y;
//...
//----------------------------------------------------------------------------
ON FORM1 MOUSE MOVE
{
    m_x = e->X;
    m_y = e->Y;
}
//----------------------------------------------------------------------------
ON TEXTBOX1 MOUSE LEAVE
{
    toolTip1->Hide(this);
}
//----------------------------------------------------------------------------
private: System::Void textBox2_MouseHover(System::Object^  sender, System::EventArgs^  e) 
{
    if( radioButton4->Checked )
    {
         toolTip1->Show("Hello",this,m_x,m_y);
    }
}
//----------------------------------------------------------------------------
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.