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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T07:20:11+00:00 2026-05-14T07:20:11+00:00

My application is intended to work almost entirely through a Windows 7 taskbar item

  • 0

My application is intended to work almost entirely through a Windows 7 taskbar item with the use of thumbnails and jump lists. I know I can easily create a Form and simply hide it, but this seems like overkill. Plus, I’d like to toy around with NativeWindow as much as possible, because I’ve never used it before.

Essentially, I have a class called RootWindow that derives from NativeWindow that will handle hotkeys and hopefully everything else. I don’t need a visible window at all, but simply something to process window messages and provide a taskbar item that I can attach thumbnails and jump lists to.

Is there some kind of special CreateParams option I need to pass to CreateHandle? Or am I out of luck?

EDIT: Well, it was easier than I thought it would be, although it’s not exactly what I want. Once I passed the NativeWindow‘s handle to the ShowWindow API, the taskbar item appeared. However, it also shows a window in the upper left corner of the screen. Is there some way to get rid of that window while still showing the taskbar item?

public class RootWindow : NativeWindow {
    public const int SW_SHOWNOACTIVATE = 4;

    [DllImport("User32.dll")]
    private static extern int ShowWindow(IntPtr hWnd, short cmdShow);

    public RootWindow() {
            CreateHandle(new CreateParams());
            ShowWindow(this.Handle, SW_SHOWNOACTIVATE);
    }
}
  • 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-14T07:20:12+00:00Added an answer on May 14, 2026 at 7:20 am

    The trick was to set the window’s style to WS_POPUP.

    const int WS_POPUP = unchecked((int)0x80000000);
    const int SW_SHOWNOACTIVATE = 4;
    
    CreateHandle(new CreateParams() {
        Style = WS_POPUP
    });
    
    ShowWindow(Handle, SW_SHOWNOACTIVATE);
    

    I also disabled Aero Peek for the window, since it’s just for background work.

    const int DWMNCRP_ENABLED = 2;
    const int DWMWA_DISALLOW_PEEK = 11;
    
    int policy = DWMNCRP_ENABLED;
    DwmSetWindowAttribute(Handle, DWMWA_DISALLOW_PEEK, ref policy, sizeof(int));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a web application in Python, intended for use by teachers and pupils
The application I'm writing is almost complete and I'd like people who speak different
Application able to record error in OnError, but we are not able to do
Application frameworks such as DotNetNuke, Eclipse, Websphere and so forth are available today which
Application has an auxiliary thread. This thread is not meant to run all the
Application 1 - Opens a SqlConnection and a SqlTransaction against a SQLServer 2005 database
My application dynamically loads assemblies at runtime from specific subfolders. These assemblies are compiled
The application my team is currently developing has a DLL that is used to
Our application is interfacing with a lot of web services these days. We have
My application has a need to let the user choose a date from a

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.