Solved

Catch event mouse right_click on CLOSE button of external application

Posted on 2008-06-25
6
672 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

895 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now