form in the background

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kayo
    New Member
    • Oct 2011
    • 4

    form in the background

    how to run a form in the background.i need to run a form where it appears until the application exit.
    on top of that form(Main), another form(Main1) runs.
    how can i implement this using C#?
    [Main runs in the background(unti l the application exits) and the Main1 runs on top of Main]
    can't i do it with out making the form property isMdiContainer to true?

    please help me!!!
  • GaryTexmo
    Recognized Expert Top Contributor
    • Jul 2009
    • 1501

    #2
    I'm not sure about an MDI application, but I do believe a form has a MinimizeToTray property (or something very similar). You can use that to make your form run in the background. You can also simply set the visible property to false so it's invisible.

    If you have functionality that runs and is never intended to be seen, why are you using a form? You might want to consider using a BackgroundWorke r, or a Thread to handle this so you don't have it on a form. Or is this form something that will appear from time to time, but would otherwise remain hidden?

    Comment

    • kayo
      New Member
      • Oct 2011
      • 4

      #3
      yes bpaper should appear time to time.
      Main should run in the background until the application exit.
      time to time Main1 and bpaper should become visible N invisible to users.

      how can i construct a code for this purpose?please help me!

      Comment

      • GaryTexmo
        Recognized Expert Top Contributor
        • Jul 2009
        • 1501

        #4
        I don't know what event you're going to have to trigger the showing and hiding of your forms but whatever you are using, you can use the Show/Hide methods on a form to control visibility.

        Give the coding a try first, then if you get stuck post back here and I'll try to help you out.

        Comment

        Working...