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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:46:12+00:00 2026-05-20T08:46:12+00:00

I have developed winform application and I have set formborderstyle=none. Thatz why when I

  • 0

I have developed winform application and I have set formborderstyle=none. Thatz why when I am running application I can’t minimize it through taskbar. Does any body knows solution for this?

I tried following code.. adding it in my form.

    const int WS_CLIPCHILDREN = 0x2000000;
    const int WS_MINIMIZEBOX = 0x20000;
    const int WS_MAXIMIZEBOX = 0x10000;
    const int WS_SYSMENU = 0x80000;
    const int CS_DBLCLKS = 0x8;
    protected override CreateParams CreateParams
    {
        get
        {
            CreateParams cp = base.CreateParams;
            cp.Style = WS_CLIPCHILDREN | WS_MINIMIZEBOX | WS_SYSMENU;
            cp.ClassStyle = CS_DBLCLKS;
            return cp;
        }
    }

I am now able to minimize the application from taskbar. But the problem is it is creating two intances of my application one which I need and the other which is unneccessary.

Does any body knows solution for this.. or does anyone has some other solution which works ?

  • 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-20T08:46:13+00:00Added an answer on May 20, 2026 at 8:46 am

    A borderless form should always be one that the user is not expected to minimize. The discoverability principle starts to apply here: most users don’t know that you can minimize a window by clicking on its taskbar icon. They’re going to expect to be able to do it by clicking the – button next to the big red x.

    The right solution is to choose a different border style for your form, one that includes the title bar and the minimize box. Windows will automatically behave as expected. Things are much easier when you follow the standard conventions of your platform, not only for you as a programmer, but for your users. It also fixes that nasty flickering effect when your form is created or restored where I can see the standard caption bar for a few seconds.

    Of course, you’ll inevitably want to do this anyway, so despite my better judgement, I’ll try to provide a solution. The first problem is I can’t reproduce the behavior you describe (Windows Server 2008 R2, .NET 4.0). Adding exactly the code shown to a new WinForms project, and setting the form’s FormBorderStyle property to “None”, there’s no way I can get two windows to show up. Clicking on the taskbar icon causes the form to minimize, clicking it again restores it.

    But there is a way to simplify your code. And you should probably be OR-ing the style flags that you’re adding with the existing style flags, rather than replacing the existing flags. Replace your code with this:

    const int WS_MINIMIZEBOX = 0x20000;
    const int CS_DBLCLKS = 0x8;
    protected override CreateParams CreateParams
    {
        get
        {
            CreateParams cp = base.CreateParams;
            cp.Style |= WS_MINIMIZEBOX;
            cp.ClassStyle |= CS_DBLCLKS;
            return cp;
        }
    }
    

    If that doesn’t fix your problem (and I’m skeptical that it will), then as I suspected, there’s something else wrong in your code that you haven’t shown us. Just because you can comment out a few lines of code and your program works as expected doesn’t necessarily imply that the problem lies in those lines of code. They can be perfectly correct, but interfering with a hack you’ve used elsewhere.

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

Sidebar

Related Questions

I have developed a WinForms application in C# that can make any window top
I have developed a WinForm Application with VB.Net (VS2010) having Office 2010 Professional Installed,
I have developed a Winform MDI application, in which client specifically requires a context
I have developed my winform application without caring about the resolution. Now am stuck
I have developed a winform application in 1280 X 1024 pixels.....when using the same
I have developed a C# WinForms application whereby the user is providing input via
I developed a WinForms application (using C#, with visual studio 2008) and I have
I have developed a window application in VS2005 using C#. I need to integrate
I have developed a Jersey Resource class. Can someone please tell me how can
Ok, I have developed this WinForms client, which interacts with a server (ASPX Application)

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.