Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. start winforms application without displaying it until receive signal?

start winforms application without displaying it until receive signal?

Scheduled Pinned Locked Moved C#
csharpwinformshelptutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    misterbear
    wrote on last edited by
    #1

    I am writing a program which will use another application for communicating with, but I want to load this other application in the background when my main application loads, and then just send a windows message to my "background" application telling it to show/hide... What I have done now is to have the "background" application started from the main application with a Process.start(filename). In the background app the code to run it looks like this: Application.Run(new BackgroundAppFrame()) (from it's "static main" method). However it doesn't seem to be possible to do this without the frame being displayed (I guess the Application.Run() first invokes the constructor and then sets it visible or something like that... And then of course Application.Run() will block so I cannot set the hidden property). Any suggestions on how to solve this? Set the size to 0 instead? Or move it out of screen? If you have a clean solution to this problem please tell me..

    D 1 Reply Last reply
    0
    • M misterbear

      I am writing a program which will use another application for communicating with, but I want to load this other application in the background when my main application loads, and then just send a windows message to my "background" application telling it to show/hide... What I have done now is to have the "background" application started from the main application with a Process.start(filename). In the background app the code to run it looks like this: Application.Run(new BackgroundAppFrame()) (from it's "static main" method). However it doesn't seem to be possible to do this without the frame being displayed (I guess the Application.Run() first invokes the constructor and then sets it visible or something like that... And then of course Application.Run() will block so I cannot set the hidden property). Any suggestions on how to solve this? Set the size to 0 instead? Or move it out of screen? If you have a clean solution to this problem please tell me..

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      From your previous post, you're going about this the wrong way. Introducing a second application for such a small operation will just make your application that much more difficult to support. You haven't made drag and drop easier by creating a second application, only more difficult. Check into that article I replied to your previous post and you'll be able to put together a modal form that itself can host multiple forms where you can then do what you were talking about. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups