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

  • SEARCH
  • Home
  • 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 4114132
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:24:58+00:00 2026-05-20T22:24:58+00:00

in windows 7 one feature is very good that when any apps is minimize

  • 0

in windows 7 one feature is very good that when any apps is minimize and when user point mouse cursor on that minimize for then the image of that form is show in hover popup. so if i want to do it in my MDI form that when any SDI is minimize in MDI form and when user point mouse on that minimize form then the form image will show in hover popup. how to accomplish it in windows application through c#

  • 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-05-20T22:24:58+00:00Added an answer on May 20, 2026 at 10:24 pm

    I have not tried this my self, but if I would think that the most likely solution for an MDI application would be to create the bitmap image of the child window prior to it being minimized and then use that image to show the last state of the window.

    You will also need to handle a few of the ‘WM_NC*‘ messages to detect that the mouse is hovering over the minimized window and then render your cached image in a popup.

    UPDATE:

    Here is a quick and dirty proof of concept, it is not perfect the tooltip does not follow all the standard tooltip functionality etc. but it should be enough to get you started. The code could also be refactored to be more reusable, but at this stage you could derive your MDI child windows from this MDIChild and you would have this basic tooltip functionality. Of course there will be issues if windows are overlapping etc.

    using System;
    using System.Drawing;
    using System.Windows.Forms;
    
    namespace MDITest
    {
      public partial class MDIChild : Form
      {
        private static TooltipForm _tooltip = new TooltipForm();
        private static Form _lastForm;
    
        private Image _lastSnapshot;
    
        public MDIChild()
        {
          InitializeComponent();
        }
    
        protected override void WndProc(ref Message m)
        {
          if (m.Msg == WM_COMMAND && m.WParam.ToInt32() == SC_MINIMIZE)
          {
            OnMinimize(EventArgs.Empty);
          }
          else if (m.Msg == WM_NCMOUSEMOVE)
          {
            int x = m.LParam.ToInt32() & 0x0000ffff;
            int y = m.LParam.ToInt32() >> 16;
            OnNcMouseMove(new MouseEventArgs(MouseButtons.None, 0, x, y, 0));
          }
          base.WndProc(ref m);
        }
    
        protected virtual void OnNcMouseMove(MouseEventArgs e)
        {
          if (this.WindowState == FormWindowState.Minimized && _lastForm != this)
          {
            _lastForm = this;
            Point pt = MdiParent.PointToScreen(this.Location);
            ShowWindowTip(pt, _lastSnapshot);
          }
        }
    
        protected virtual void OnMinimize(EventArgs e)
        {
          _tooltip.Visible = false;
          if (_lastSnapshot == null)
          {
            _lastSnapshot = new Bitmap(100, 100);
          }
    
          using (Image windowImage = new Bitmap(ClientRectangle.Width, ClientRectangle.Height))
          using (Graphics windowGraphics = Graphics.FromImage(windowImage))
          using (Graphics tipGraphics = Graphics.FromImage(_lastSnapshot))
          {      
            Rectangle r = this.RectangleToScreen(ClientRectangle);
            windowGraphics.CopyFromScreen(new Point(r.Left, r.Top), Point.Empty, new Size(r.Width, r.Height));
            windowGraphics.Flush();
    
            float scaleX = 1;
            float scaleY = 1;
            if (ClientRectangle.Width > ClientRectangle.Height)
            {
              scaleY = (float)ClientRectangle.Height / ClientRectangle.Width;
            }
            else if (ClientRectangle.Height > ClientRectangle.Width)
            {
              scaleX = (float)ClientRectangle.Width / ClientRectangle.Height;
            }
            tipGraphics.DrawImage(windowImage, 0, 0, 100 * scaleX, 100 * scaleY);
          }
        }
    
        private static void ShowWindowTip(Point pt, Image image)
        {
          if (_tooltip.Visible)
          {
            _tooltip.Visible = false;
          }
    
          _tooltip.Image = image;
          _tooltip.Show();
          _tooltip.Location = new Point(pt.X, pt.Y - _tooltip.Height - 10);
        }
    
        private static int WM_NCMOUSEMOVE = 0x00A0;
        private static int WM_COMMAND = 0x0112;
        private static int SC_MINIMIZE = 0xf020;
      }
    }
    

    Here is the TooltipForm.designer.cs

    namespace MDITest
    {
      partial class TooltipForm
      {
        /// <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.pictureBox1 = new System.Windows.Forms.PictureBox();
          ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
          this.SuspendLayout();
          // 
          // pictureBox1
          // 
          this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
          this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
          this.pictureBox1.Location = new System.Drawing.Point(0, 0);
          this.pictureBox1.Name = "pictureBox1";
          this.pictureBox1.Size = new System.Drawing.Size(134, 112);
          this.pictureBox1.TabIndex = 0;
          this.pictureBox1.TabStop = false;
          // 
          // TooltipForm
          // 
          this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
          this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
          this.ClientSize = new System.Drawing.Size(134, 112);
          this.ControlBox = false;
          this.Controls.Add(this.pictureBox1);
          this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
          this.MaximizeBox = false;
          this.MinimizeBox = false;
          this.Name = "TooltipForm";
          this.ShowIcon = false;
          this.ShowInTaskbar = false;
          this.Text = "TooltipForm";
          this.TopMost = true;
          ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
          this.ResumeLayout(false);
    
        }
    
        #endregion
    
        private System.Windows.Forms.PictureBox pictureBox1;
      }
    }
    

    And the TooltipForm.cs

    using System;
    using System.Drawing;
    using System.Windows.Forms;
    
    namespace MDITest
    {
      public partial class TooltipForm : Form
      {
        Timer _timer = new Timer();
    
        public TooltipForm()
        {
          InitializeComponent();
          TopLevel = true;
          _timer.Enabled = false;
          _timer.Interval = 5000;
          _timer.Tick += new EventHandler(_timer_Tick);
        }
    
        void _timer_Tick(object sender, EventArgs e)
        {      
          Visible = false;
        }
    
        protected override void SetVisibleCore(bool value)
        {
          if (value == true)
          {
            _timer.Start();
          }
          else
          {
            _timer.Stop();
          }
          base.SetVisibleCore(value);
        }
    
        public Image Image
        {
          get
          {
            return pictureBox1.Image;
          }
          set
          {
            pictureBox1.Image = value;
          }
        }
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does any one know a good way to do remote procedure calls in windows
One of the bullet point features for Windows Vista Enterprize and Ultimate is the
I'm trying to search using the windows search one of my web directories for
What's the best way to pass data from one Windows Forms app (an office
I am hosting a WCF service in a Windows Service on one of our
Can some one specify the windows API, one need to use in order to
We've installed Windows Search Server Express on one of our servers, which apparently runs
How would one go about adding a submenu item to the windows explorer context
How does one change the current directory in SQL Plus under windows. I am
Helvetica is available in one form or another on Windows, Mac OS X, and

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.