Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8533467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:58:18+00:00 2026-06-11T09:58:18+00:00

i am trying to write a code on Mouse_Hover event of a panel in

  • 0

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);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T09:58:19+00:00Added an answer on June 11, 2026 at 9:58 am

    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

    namespace panelvisible
    {
        partial class Form1
        {
            /// <summary>
            /// Required designer variable.
            /// </summary>
            private System.ComponentModel.IContainer components = null;
    
            /// <summary>
            /// Clean up any resources being used.
            /// </summary>
            /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
            protected override void Dispose(bool disposing)
            {
                if (disposing && (components != null))
                {
                    components.Dispose();
                }
                base.Dispose(disposing);
            }
    
            #region Windows Form Designer generated code
    
            /// <summary>
            /// Required method for Designer support - do not modify
            /// the contents of this method with the code editor.
            /// </summary>
            private void InitializeComponent()
            {
                this.panel1 = new System.Windows.Forms.Panel();
                this.label1 = new System.Windows.Forms.Label();
                this.panel2 = new System.Windows.Forms.Panel();
                this.panel1.SuspendLayout();
                this.SuspendLayout();
                // 
                // panel1
                // 
                this.panel1.BackColor = System.Drawing.Color.Red;
                this.panel1.Controls.Add(this.panel2);
                this.panel1.Controls.Add(this.label1);
                this.panel1.Location = new System.Drawing.Point(101, 36);
                this.panel1.Name = "panel1";
                this.panel1.Size = new System.Drawing.Size(200, 100);
                this.panel1.TabIndex = 0;
                this.panel1.MouseHover += new System.EventHandler(this.panel1_MouseHover);
                // 
                // label1
                // 
                this.label1.AutoSize = true;
                this.label1.Location = new System.Drawing.Point(49, 42);
                this.label1.Name = "label1";
                this.label1.Size = new System.Drawing.Size(31, 13);
                this.label1.TabIndex = 0;
                this.label1.Text = "Hello";
                this.label1.Visible = false;
                // 
                // panel2
                // 
                this.panel2.BackColor = System.Drawing.Color.Gray;
                this.panel2.Location = new System.Drawing.Point(33, 70);
                this.panel2.Name = "panel2";
                this.panel2.Size = new System.Drawing.Size(118, 10);
                this.panel2.TabIndex = 1;
                this.panel2.Visible = false;
                // 
                // Form1
                // 
                this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
                this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
                this.ClientSize = new System.Drawing.Size(494, 205);
                this.Controls.Add(this.panel1);
                this.Name = "Form1";
                this.Text = "Form1";
                this.panel1.ResumeLayout(false);
                this.panel1.PerformLayout();
                this.ResumeLayout(false);
    
            }
    
            #endregion
    
            private System.Windows.Forms.Panel panel1;
            private System.Windows.Forms.Label label1;
            private System.Windows.Forms.Panel panel2;
        }
    }
    

    Code for code behind

    using System;
    using System.Windows.Forms;
    
    namespace panelvisible
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
    
            private void panel1_MouseHover(object sender, EventArgs e)
            {
                this.label1.Visible = true;
                this.label1.Enabled = true;
                this.panel2.Visible = true;
                this.panel2.Enabled = true;
            }
    
    
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to write code to shuffle an Array without using Collections. My
Hi I am trying to write an application that will play morse code. I
I m trying write code that after reset set up rrpmax as 3000. It
I'm trying to write code in my controller that when run, will create a
I am trying to write code for getting my cords on the mobile. I
I'm trying to write code that will load an image from a resource, and
I've been trying to write code that loads a .png file, attaches hotspot information,
Alright, here I am again trying to write code from scratch and I can't
Trying to write a code at the moment that basically tests to see if
I'm trying to write a code to actually sort my array in an ascending

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.