i am trying to write a code on Mouse_Hover event of a panel in my winform app using c#. This is my code ..
private void viewscreen_MouseHover(object sender, EventArgs e)
{
statuspnl.Enabled = true;
statuspnl.Visible = true;
}
but the problem is the event is not firing when i am taking the mouse over the viewscreen panel
// viewscreen
//
this.viewscreen.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
this.viewscreen.Controls.Add(this.statuspnl);
this.viewscreen.Location = new System.Drawing.Point(208, 16);
this.viewscreen.Name = "viewscreen";
this.viewscreen.Size = new System.Drawing.Size(370, 290);
this.viewscreen.TabIndex = 0;
this.viewscreen.MouseHover += new System.EventHandler(this.viewscreen_MouseHover);
Please create one window app with the name as "panelvisible". Add one form as "Form1" and add these code in respective files.
Code for designer
Code for code behind
Did you have this code?
It should be added automatically but make sure you don't change this... Another way - remove mouse hover event and add it again.
Hope this will help.
Is you view screen a form or is it realy a panel? And is you panel / form enabled?