Solved

Catch event mouse right_click on CLOSE button of external application

Posted on 2008-06-25
6
674 Views
Last Modified: 2012-05-05
Hello Experts!
Please help me how to catch event mouse right_click on CLOSE button ( top- right of windows with sign X) of External application.
i need when user right_click on that position then return handle of active window.

Code or example please!
Thanks.
0
Comment
Question by:z27
  • 2
  • 2
6 Comments
 
LVL 21

Accepted Solution

by:
developmentguru earned 250 total points
ID: 21874213
If this is possible you would need to write a DLL to allow a Windows message hook.  You would need to know the class name for the little red X, that would let you know if it was the right section.  You would be able to tell that you had a WM_MOUSEDOWN message.  Here is a link explaining Windows hooks, you would need a global hook.  The link has downloadable source code.

http://delphi.about.com/od/kbwinshell/a/delphi_hook.htm
0
 

Author Comment

by:z27
ID: 21889676
Hello developmentguru!
i think it would need solve with Windows message hook too. Sorry for my Delphi, can you help me with demo source?
0
 
LVL 21

Expert Comment

by:developmentguru
ID: 21909845
The link I provided does have demo source.  Due to the act that it is posted on a commercial web site I should not copy it here.  If you have questions on the soure they give you, let me know.
0
 

Author Comment

by:z27
ID: 21936233
sorry, if someone post demo so better...
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question