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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T21:24:35+00:00 2026-05-12T21:24:35+00:00

How can I minimize application as soon as it starts up to run it

  • 0

How can I minimize application as soon as it starts up to run it at the background in Windows Mobile 6? I want to minimize application it is launch automatically (i.e. auto-starts) and when later, if user wants to see application, it can run from the Program menu etc.

I tried some of the code but it does not work!

Traditional minimize scheme, although it will not solve my problem as using this code will never show the application to the user again (even this code does not work)

private void GUI_Load(object sender, EventArgs e)
{                    
     this.Hide();
     this.Visible = false;
}

and second option is to call native API (source: http://www.blondmobile.com/2008/04/windows-mobilec-how-to-minimize-your_5311.html)

private void GUI_Load(object sender, EventArgs e)
{                    
     this.HideApplication();
}

[DllImport("coredll.dll")]
static extern int ShowWindow(IntPtr hWnd, int nCmdShow);

const int SW_MINIMIZED = 6;

public void HideApplication()
{
      ShowWindow(this.Handle, SW_MINIMIZED);
}

Second code does work from any other part of the program, but not from Load Event.

  • 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-12T21:24:35+00:00Added an answer on May 12, 2026 at 9:24 pm

    The only solution I thought is using System.Windows.Forms.Timer and It works

    private void GUI_Load(object sender, EventArgs e)
    {                        
    // Initialize timer to hide application when automatically launched
    _hideTimer = new System.Windows.Forms.Timer();
    _hideTimer.Interval = 0; // 0 Seconds
    _hideTimer.Tick += new EventHandler(_hideTimer_Tick);
    _hideTimer.Enabled = true;
    }
    
    // Declare timer object
    System.Windows.Forms.Timer _hideTimer;
    void _hideTimer_Tick(object sender, EventArgs e)
    {
        // Disable timer to not use it again
        _hideTimer.Enabled = false;
        // Hide application
        this.HideApplication();
        // Dispose timer as we need it only once when application auto-starts
        _hideTimer.Dispose();
    }
    
    [DllImport("coredll.dll")]
    static extern int ShowWindow(IntPtr hWnd, int nCmdShow);
    
    const int SW_MINIMIZED = 6;
    
    public void HideApplication()
    {
          ShowWindow(this.Handle, SW_MINIMIZED);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create an application that user can minimize to taskbar on Windows
I'm making a small tool application that user can minimize in the taskbar .
I get want to know whether we can maximize and minimize a whole application.
I want to minimize the application, leaving it in background doing exactly the same
I want to prevent memory working set minimize in Console application. In windows application,
How can I have my application minimize itself to the system tray in WindowsXP/Vista?
How can I minimize the footprint of a website built using MVC. My application
While executing my program, I want to hide/minimize Microsoft Speech Recognition Application: alt text
I want to minimize all application that are running in the system, except mine.
I have one task to developer an application in which user can press the

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.