Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 12-12-2004, 08:22 AM
hemaulo hemaulo is offline
Senior Member
 
Join Date: Dec 2003
Posts: 285
Default Active Window Title

How can:
1. Get active window title
2. Close it
3. Determine active window(application) filename
4. To be notified when active window changes or another application is executed

Medniex
Reply With Quote
  #2  
Old 12-12-2004, 11:59 AM
gLes gLes is offline
Senior Member
 
Join Date: Jan 2001
Posts: 2,273
Default RE: Active Window Title

Code:
1. Handle := GetForegroundWindow;
Code:
2. SendMessage(GetForegroundWindow, WM_CLOSE, 0, 0);
3. I'm lazy right now to look that up for you, you first need to determine the owner process of that window with GetWindowThreadProcessId, and you've got to open the process and stuff like that, you can look these up in the Win32 SDK, or a bit more up to date at [link=http://msdn.microsoft.com]msdn.microsoft.com[/link]

4. Using hooks, veeery difficult try searching this forum for the term HOOK, I've no mood for looking that up for you either, sorry

Hope that helps...

gLes
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 05:33 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.