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