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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:30:38+00:00 2026-05-27T00:30:38+00:00

I have this problem, I wrote a WinForms application, I have use it for

  • 0

I have this problem, I wrote a WinForms application, I have use it for a while with no problems. Next I just wrote a windows service to start/stop automatically my winforms app. But now the window is not shown, and in the task manager it’s running. Besides, for testing my service, first it was a console app, so Console.WriteLine() was useful to display data, status, variables, etc, once it became a service, no console anymore. So, it’s anything I’m missing?

Well, what I need is the service starting/stoping the winform application. It’s a monitoring like. So, if the winform app is not running, creates a process, and starts it. But if is midnight, then the app should not be running, then the service finds the process and closes it. I don’t want to turn the winform app into a service, or the service into a winform app.

I first thought just to put a shortcut to my winforms app in the “startup” folder to start it, but I need to close it, and/or restart it. So that’s why I wrote the service.

Thanks!

  • 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-27T00:30:38+00:00Added an answer on May 27, 2026 at 12:30 am

    As of Windows Vista, a service can’t interact directly with the desktop, meaning that it can’t produce a visible form.

    Even if you set it to try to do so, the best you will get is a UAC-style prompt indicating to the user than your program would like to be displayed. This was the result when we tried to follow this: How can a Windows service execute a GUI application?

    We have one Windows app that absolutely needs to interact with the desktop it was originally written as a Windows Service. In order to get around the restrictions, we were forced to write it as a WinForms app with the Visible property of the main form set to “false”. When we need to show it, we set it to “true”. It’s a hack and we know it, but we never could find a better solution.

    This post does provide alternatives. They didn’t work for us, but perhaps your situation is different. http://msdn.microsoft.com/en-us/library/windows/desktop/ms683502(v=vs.85).aspx

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

Sidebar

Related Questions

I've wrote this simple piece of code. And I have a slight problem with
I have this problem where I open Visual Studio and the internal windows are
I have this problem I've been trying to tackle for a while. I have
I have this problem in my ASP.NET application where I'm seeing some of my
Let's create WinForms Application (I have Visual Studio 2008 running on Windows Vista, but
I have Normal Windows Form (WinForm) C# (.Net 3.5) application, this application has label
I have this problem and don't know where to start. I need to write
I have problem with this code: file = tempfile.TemporaryFile(mode='wrb') file.write(base64.b64decode(data)) file.flush() os.fsync(file) # file.seek(0)
I have this problem I'm hoping someone knows the answer to. I have an
i have this problem to find a particular xml node l have post this

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.