Focus App. Via notifyicon?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Kevinyy
    New Member
    • Jul 2008
    • 77

    Focus App. Via notifyicon?

    How can i focus/make active/bring to front my program when i double click the notify icon?
    I have:
    show in taskbar = false
    i have tried:
    dll reference or setforegroundwi ndow(this.handl e);
    this.activate() ;
    this.bringtofro nt();
    this.focus() (and a combo of those)


    What is going on??? and what can i do?

    im using C#.net2.2
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    What state is your window in when you try to do this?
    If it is minimized, try changing the WindowState

    Comment

    • Kevinyy
      New Member
      • Jul 2008
      • 77

      #3
      Originally posted by Plater
      What state is your window in when you try to do this?
      If it is minimized, try changing the WindowState
      Not minimized, but nonetheless ive also tried those windowstates :(

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        So your application is in a visible state, just some other window is on top of it?
        Is the window that is on top of it a "top most" window?
        Have you tried setting the TopMost property of your window to true, just to see if it forces it to the front?

        Comment

        • Kevinyy
          New Member
          • Jul 2008
          • 77

          #5
          Originally posted by Plater
          So your application is in a visible state, just some other window is on top of it?
          Is the window that is on top of it a "top most" window?
          Have you tried setting the TopMost property of your window to true, just to see if it forces it to the front?
          yea..just other windows on top of it, how would i force the Topmost property?

          Comment

          • Curtis Rutland
            Recognized Expert Specialist
            • Apr 2008
            • 3264

            #6
            Originally posted by Kevinyy
            yea..just other windows on top of it, how would i force the Topmost property?
            Set this.TopMost = true

            Comment

            • Kevinyy
              New Member
              • Jul 2008
              • 77

              #7
              Originally posted by insertAlias
              Set this.TopMost = true
              Thank you, it;s workin now :)

              Comment

              Working...