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 7013859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:26:44+00:00 2026-05-27T22:26:44+00:00

How can i make, what i will call, a popup window in WinForms? Since

  • 0

How can i make, what i will call, a “popup” window” in WinForms?


Since i used my own made-up word “popup”, let me give examples of this so-called “popup” window:

  • a tooltip window (can extend outside the boundaries of its parent form, doesn’t appear in the taskbar, is not modal, and doesn’t steal focus):

    enter image description here

  • a popup menu window (can extend outside the boundaries of its parent form, doesn’t appear in the taskbar, is not modal, and doesn’t steal focus):

    enter image description here

  • a drop-down window (can extend outside the boundaries of its parent form, doesn’t appear in the taskbar, is not modal, and doesn’t steal focus):

    enter image description here

  • A main menu window (can extend outside the boundaries of its parent form, doesn’t appear in the taskbar, is not modal, and doesn’t steal focus):

    enter image description here

  • Update A popup window not make itself the “active” window when interacted with using a mouse or keyboard (the “owner” window remains the active window):

enter image description here

The attributes that i’m looking for in this mythical “popup” are that it:

  • can extend outside the boundaries of its parent form (i.e. is not a child window)
  • doesn’t appear in the taskbar (i.e. Window’s heuristics of which windows should appear doesn’t kick in, nor does it have WS_EX_APPWINDOW extended window style)
  • is not modal (i.e. doesn’t disable its “owner”)
  • doesn’t steal focus
  • is always on-top of of it’s “owner”
  • does not become the “active” window when interacted with (the owner remains active)

Windows applications are already managing to create such windows. How can i do it in a WinForms application?

Related questions

  • How do i achieve all the above in native code?
  • How do i create a popup window in Delphi?
  • i have this native code to show a “popup” window – what P/Invokes are required to perform the same actions in .NET?
  • i have a set of P/Invoke’s in .NET – can i reuse a regular WinForm, overriding certain methods, to achieve the same effect?
  • i have WinForm that i’m showing as a “popup” by overriding certain methods – is there a built-in Control that can act as a popup for me?
  • How to simulate a drop-down window in WinForms?

Attempt#1

i tried the Show(onwer) + ShowWithoutActivation method:

PopupForm dd = new PopupForm ();
dd.Show(this);

with PopupForm:

public class PopupForm: Form
{
    public PopupForm()
    {
        InitilizeComponent();
    }

    private void InitilizeComponent()
    {
        this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
        this.WindowState = FormWindowState.Normal;
        this.ShowInTaskbar = false;
    }

    protected override bool ShowWithoutActivation
    { get { return true; } }
}

Very nearly solved the problem, but then i discovered was reminded of another property of “popup” windows: they do not take focus from their “owner” form become active when interacted with by mouse or keyboard.

  • 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-27T22:26:45+00:00Added an answer on May 27, 2026 at 10:26 pm

    You want an owned window. In your main form:

    private void showPopup_Click(object sender, EventArgs e)
    {
        PopupForm popupForm = new PopupForm();
        // Make "this" the owner of form2
        popupForm.Show(this);
    }
    

    PopupForm should look like this:

    public partial class PopupForm : Form
    {
        private bool _activating = false;
    
        public PopupForm()
        {
            InitializeComponent();
        }
    
        // Ensure the popup isn't activated when it is first shown
        protected override bool ShowWithoutActivation
        {
            get
            {
                return true;
            }
        }
    
        private const int WM_NCACTIVATE = 0x86;
    
        [DllImport("user32.dll", CharSet = CharSet.Auto)]
        public static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam);
    
        protected override void WndProc(ref Message m)
        {
            // The popup needs to be activated for the user to interact with it,
            // but we want to keep the owner window's appearance the same.
            if ((m.Msg == WM_NCACTIVATE) && !_activating && (m.WParam != IntPtr.Zero))
            {
                // The popup is being activated, ensure parent keeps activated appearance
                _activating = true;
                SendMessage(this.Owner.Handle, WM_NCACTIVATE, (IntPtr) 1, IntPtr.Zero);
                _activating = false;
                // Call base.WndProc here if you want the appearance of the popup to change
            }
            else
            {
                base.WndProc(ref m);
            }
        }
    }
    

    And make sure that PopupForm.ShowInTaskbar = false.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know we can use *21*Phone Number# will make a call forwarding.i want to
How can I make a helper that will tell me how many weeks ago
How can i make an extension method that will work like this public static
std::map<std::string, int> m; // Can I make assumption that m[NoSuchKey] will return 0? std::cout
I will try to make this as clear as I can, but if you
Can someone share how to make items in a ListViewer scrollable? Source code will
How can make a link within a facebox window that redirects it to another
How can I create a function, that will call another function, and when it
I can make a DAO recordset in VB6/Access do anything - add data, clean
I can make Firefox not display the ugly dotted focus outlines on links with

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.