M Michael Nemtsev Jan 18, 2007 #3 Hello pigeonrandle, http://www.pinvoke.net/default.aspx/user32/GetActiveWindow.html --- WBR, Michael Nemtsev [C# MVP] :: blog: http://spaces.live.com/laflour "The greatest danger for most of us is not that our aim is too high and we miss it, but that it is too low and we reach it" (c) Michelangelo p> Hi, p> Is there an API function that can do this? p> Cheers, p> James
Hello pigeonrandle, http://www.pinvoke.net/default.aspx/user32/GetActiveWindow.html --- WBR, Michael Nemtsev [C# MVP] :: blog: http://spaces.live.com/laflour "The greatest danger for most of us is not that our aim is too high and we miss it, but that it is too low and we reach it" (c) Michelangelo p> Hi, p> Is there an API function that can do this? p> Cheers, p> James
? =?ISO-8859-2?Q?Marcin_Grz=EAbski?= Jan 18, 2007 #4 Hi James, Windows API: [DllImport("user32.dll")] static extern IntPtr GetActiveWindow(); or .NET: Form activeForm=Form.ActiveForm; HTH Marcin pigeonrandle napisa³(a):
Hi James, Windows API: [DllImport("user32.dll")] static extern IntPtr GetActiveWindow(); or .NET: Form activeForm=Form.ActiveForm; HTH Marcin pigeonrandle napisa³(a):
P pigeonrandle Jan 18, 2007 #5 All, Thanks for the swift replies. When i said window, i meant buttons/textboxes included... Cheers, James.
All, Thanks for the swift replies. When i said window, i meant buttons/textboxes included... Cheers, James.
D Dave Sexton Jan 18, 2007 #6 Hi, Check out the following link, which provides some information about how (and if) it's possible: GetFocus Function http://msdn2.microsoft.com/en-us/library/ms646294.aspx -- Dave Sexton http://davesexton.com/blog pigeonrandle said: All, Thanks for the swift replies. When i said window, i meant buttons/textboxes included... Cheers, James. Michael said: Hello pigeonrandle, http://www.pinvoke.net/default.aspx/user32/GetActiveWindow.html --- WBR, Michael Nemtsev [C# MVP] :: blog: http://spaces.live.com/laflour "The greatest danger for most of us is not that our aim is too high and we miss it, but that it is too low and we reach it" (c) Michelangelo p> Hi, p> Is there an API function that can do this? p> Cheers, p> James. Click to expand... Click to expand...
Hi, Check out the following link, which provides some information about how (and if) it's possible: GetFocus Function http://msdn2.microsoft.com/en-us/library/ms646294.aspx -- Dave Sexton http://davesexton.com/blog pigeonrandle said: All, Thanks for the swift replies. When i said window, i meant buttons/textboxes included... Cheers, James. Michael said: Hello pigeonrandle, http://www.pinvoke.net/default.aspx/user32/GetActiveWindow.html --- WBR, Michael Nemtsev [C# MVP] :: blog: http://spaces.live.com/laflour "The greatest danger for most of us is not that our aim is too high and we miss it, but that it is too low and we reach it" (c) Michelangelo p> Hi, p> Is there an API function that can do this? p> Cheers, p> James. Click to expand... Click to expand...