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. how to detect windowstate outside form?

how to detect windowstate outside form?

Scheduled Pinned Locked Moved C#
questiontutorial
5 Posts 3 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.
  • P Offline
    P Offline
    ping_jacob
    wrote on last edited by
    #1

    i need to detect windowstate outside form ex. my application is running when i open a application (ex. internet explorer), i need to detect windowstate of internet explorer how can i do it? please give some tip or hint to me thanks a lot...^^

    L G 2 Replies Last reply
    0
    • P ping_jacob

      i need to detect windowstate outside form ex. my application is running when i open a application (ex. internet explorer), i need to detect windowstate of internet explorer how can i do it? please give some tip or hint to me thanks a lot...^^

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      Hi, this is a two-step process requiring some P/Invoke to Win32 functions: 1. find the handle of the right window; depending on what you know about it, you can read Process.MainWindowHandle; or by enumerating all windows, see EnumWindows[^] 2. now get information on that window, possibly by calling GetWindowPlacement[^] :)

      Luc Pattyn [Forum Guidelines] [My Articles]


      I use ListBoxes for line-oriented text output (not TextBoxes), and PictureBoxes for pictures (not drawings).


      modified on Friday, June 10, 2011 12:14 PM

      P 1 Reply Last reply
      0
      • L Luc Pattyn

        Hi, this is a two-step process requiring some P/Invoke to Win32 functions: 1. find the handle of the right window; depending on what you know about it, you can read Process.MainWindowHandle; or by enumerating all windows, see EnumWindows[^] 2. now get information on that window, possibly by calling GetWindowPlacement[^] :)

        Luc Pattyn [Forum Guidelines] [My Articles]


        I use ListBoxes for line-oriented text output (not TextBoxes), and PictureBoxes for pictures (not drawings).


        modified on Friday, June 10, 2011 12:14 PM

        P Offline
        P Offline
        ping_jacob
        wrote on last edited by
        #3

        GetWindowPlacment <- how to use it? i'm testing, but i don't understand about this function. if i need to know application state, ex. minimize, maximize, normal how can i do? i'll get information window to compare. please give more tip or hint to me. thanks so much...

        L 1 Reply Last reply
        0
        • P ping_jacob

          GetWindowPlacment <- how to use it? i'm testing, but i don't understand about this function. if i need to know application state, ex. minimize, maximize, normal how can i do? i'll get information window to compare. please give more tip or hint to me. thanks so much...

          L Offline
          L Offline
          Luc Pattyn
          wrote on last edited by
          #4

          Hi, I gave you the link to the MSDN page on GetWindowPlacement; what you want is the value of showCmd. Since this is a native function and your app is a .NET app, you will need some P/Invoke stuff; I hope you are familiar with that, if not be warned, it ain't that simple. Here is a link to P/Invoke GetWindowPlacement[^]. :)

          Luc Pattyn [Forum Guidelines] [My Articles]


          I use ListBoxes for line-oriented text output (not TextBoxes), and PictureBoxes for pictures (not drawings).


          modified on Friday, June 10, 2011 12:14 PM

          1 Reply Last reply
          0
          • P ping_jacob

            i need to detect windowstate outside form ex. my application is running when i open a application (ex. internet explorer), i need to detect windowstate of internet explorer how can i do it? please give some tip or hint to me thanks a lot...^^

            G Offline
            G Offline
            Giorgi Dalakishvili
            wrote on last edited by
            #5

            This article should help: Window Tabifier[^]

            Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion

            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