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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T17:13:05+00:00 2026-05-20T17:13:05+00:00

I have a program that I want to start up in the background and,

  • 0

I have a program that I want to start up in the background and, when I want to view it later, be able to click the shortcut link or executable and have it bring up my application. I’ve gotten this to work in the Windows Mobile emulator but when I actually try it on a device, the app minimizes but I can’t bring it back up unless I go to the built-in task manager program and click Switch To. Both the emulator and device are running WM 6.1.4. Even using the Minimize Control Box (the ‘X’) for smart minimization will minimize the app but I can’t bring my app back up when I click on the .exe file.

Any thoughts? Appreciate the help!

EDIT: Okay, so I probably left out some key information. This is a multi-threaded program. When I don’t start the threads and just let the main UI thread run, the program minimizes and restores just fine. As soon as I start the background threads I need to run, the program will minimize, but will not restore. Do I need to use something other than SW_MINIMIZE for this case?

Here’s my code that minimizes the program:

private void HideForm()
{
    if (this.InvokeRequired)
    {
        HideFormCallback del = new HideFormCallback(HideForm);
        this.Invoke(del);
    }
    else
        ShowWindow(this.Handle, SW_MINIMIZE);
}

private const int SW_MINIMIZE = 6;

[DllImport("coredll.dll")]
private static extern bool ShowWindow(IntPtr wHnd, int cmdShow);
  • 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-20T17:13:06+00:00Added an answer on May 20, 2026 at 5:13 pm

    Ok I found the answer. It actually had nothing to do with the separate thread at all. It seems an Intermec DLL I’m using is causing the issue. The device is an Intermec CK3 scanner/handheld and in my program I’m trying to set the imager illumination setting with the following code:

    Imager i = new Imager();
    i.IllumLevel = 10;
    i.Dispose();

    I don’t know if the Imager class is bugged and affecting the way WM tries to restore the app or if it’s the way I am calling it but commenting out these three lines of codes fixes the problem so I will look in to this further.

    Thanks anyways though, guys!

    EDIT: Looks like the code above needs to be invoked on the UI thread to be called and disposed correctly. Once I did this minimizing and restoring worked perfectly.

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

Sidebar

Related Questions

I have a program that I want to use as an autorun. I want
I have a little program that I want to make open automatically when my
I have a .Net program that I want to install on a terminal server.
I have a flash program that loads movie clips dynamically and sometimes they want
in a C program I have an long* that I want to serialize (thus
I want to have an executable file that will call some other programs. The
I have a program that spits out both standard error and standard out, and
I have a program that creates a Windows user account using the NetUserAdd() API
I have a program that uses the mt19937 random number generator from boost::random. I
I have a program that spits out an Excel workbook in Excel 2003 XML

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.