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. show/hide detection

show/hide detection

Scheduled Pinned Locked Moved C#
question
11 Posts 5 Posters 1 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 Morad SAJID

    hello, un have 2 application and i send messages between them using named pipes technologie; i send 2 messages , the first for showing the application and the second for hiding it; the probleme is before sending the messages i have to know the state of application (show/hide). how can i know the state of my second application?:confused:

    P Offline
    P Offline
    Pete OHanlon
    wrote on last edited by
    #2

    You'll need a method that queries the state of the second application.

    Deja View - the feeling that you've seen this post before.

    M 1 Reply Last reply
    0
    • P Pete OHanlon

      You'll need a method that queries the state of the second application.

      Deja View - the feeling that you've seen this post before.

      M Offline
      M Offline
      Morad SAJID
      wrote on last edited by
      #3

      whitch method do you talking about? i can figure out please help :doh:

      A 1 Reply Last reply
      0
      • M Morad SAJID

        whitch method do you talking about? i can figure out please help :doh:

        A Offline
        A Offline
        AliAmjad
        wrote on last edited by
        #4

        A method which you have to write in order to figure out the state of the application ! :)

        AliAmjad(MCP) First make it Run THEN make it Run Fast.

        M 1 Reply Last reply
        0
        • A AliAmjad

          A method which you have to write in order to figure out the state of the application ! :)

          AliAmjad(MCP) First make it Run THEN make it Run Fast.

          M Offline
          M Offline
          Morad SAJID
          wrote on last edited by
          #5

          i m so sorry, but i dont understand what do you mean, i want to know can i know the state of a dialog or application (hide/show) ? if yes , how? thanks

          K P 2 Replies Last reply
          0
          • M Morad SAJID

            i m so sorry, but i dont understand what do you mean, i want to know can i know the state of a dialog or application (hide/show) ? if yes , how? thanks

            K Offline
            K Offline
            Kristian Sixhoj
            wrote on last edited by
            #6

            This is easy. Create a method that checks if the form is visible or not. (Hint: use the Visible property)

            Kristian Sixhoej


            "Any fool can learn from his own mistakes, but a wise man learns from mistakes of others"

            1 Reply Last reply
            0
            • M Morad SAJID

              i m so sorry, but i dont understand what do you mean, i want to know can i know the state of a dialog or application (hide/show) ? if yes , how? thanks

              P Offline
              P Offline
              Pete OHanlon
              wrote on last edited by
              #7

              Check to see if the form is visible.

              Deja View - the feeling that you've seen this post before.

              M 1 Reply Last reply
              0
              • P Pete OHanlon

                Check to see if the form is visible.

                Deja View - the feeling that you've seen this post before.

                M Offline
                M Offline
                Morad SAJID
                wrote on last edited by
                #8

                i want to know if is visible from another application not the same application i hope that now that s is more clear

                P 1 Reply Last reply
                0
                • M Morad SAJID

                  i want to know if is visible from another application not the same application i hope that now that s is more clear

                  P Offline
                  P Offline
                  Pete OHanlon
                  wrote on last edited by
                  #9

                  Morad SAJID wrote:

                  i want to know if is visible from another application not the same application i hope that now that s is more clear

                  How can I put this simply? If you want to know if application B is visible or not, then application A is going to have to query it and ask it if it is visible or not. Hence, application B will have to provide this information. That's what we've been telling you all along. There's no easy way for the first application to know this - it's the responsibility of the second app to tell it.

                  Deja View - the feeling that you've seen this post before.

                  M 1 Reply Last reply
                  0
                  • M Morad SAJID

                    hello, un have 2 application and i send messages between them using named pipes technologie; i send 2 messages , the first for showing the application and the second for hiding it; the probleme is before sending the messages i have to know the state of application (show/hide). how can i know the state of my second application?:confused:

                    M Offline
                    M Offline
                    Michael Potter
                    wrote on last edited by
                    #10

                    I would have the application that shows/hides create a named Mutex when it is visible. It can release the Mutex when it gets hidden. The calling app can try and create the same named Mutex and if it fails, it knows the application is visible. If it succeeds, it releases the Mutex and knows that the application is hidden.

                    1 Reply Last reply
                    0
                    • P Pete OHanlon

                      Morad SAJID wrote:

                      i want to know if is visible from another application not the same application i hope that now that s is more clear

                      How can I put this simply? If you want to know if application B is visible or not, then application A is going to have to query it and ask it if it is visible or not. Hence, application B will have to provide this information. That's what we've been telling you all along. There's no easy way for the first application to know this - it's the responsibility of the second app to tell it.

                      Deja View - the feeling that you've seen this post before.

                      M Offline
                      M Offline
                      Morad SAJID
                      wrote on last edited by
                      #11

                      yes thank you i have an idéa but i don't know if it will be works; i ll change the process name of the application A, the application B will looking for the first name of application A , when it will not find it it will know that my application is hided, but how to change the processname of my application; thakks again

                      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