Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Event when user does Windows Key+M ?

Posted on 2006-06-20
9
Medium Priority
?
199 Views
Last Modified: 2010-04-05
What event fires when the user presses Windows Key + M ? Aplication.OnMinimixe does not call for me. is there a way of trapping it in OnKeyDown or something?

Thanks, Tom.
0
Comment
Question by:tomcorcoran
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
9 Comments
 
LVL 10

Expert Comment

by:atul_parmar
ID: 16943621
You won't get the onMinimize or any other message from the os because Window Key + M doesn't really minimize the window but functions same as when you click show desktop from taskbar.
0
 
LVL 10

Expert Comment

by:atul_parmar
ID: 16943689
Here is one PAQ check if it works for you. because it behaves differently on different os. (me, xp, xp with sp2)
http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20340906.html
0
 

Author Comment

by:tomcorcoran
ID: 16943845
Thanks. I tried
procedure SysCommand(var Message: TWMSYSCOMMAND); message WM_SYSCOMMAND;
as described but it was not called.

To test it, I tried the OnSize as well which was called but  SysCommand was not....

Tom.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 26

Expert Comment

by:EddieShipman
ID: 16946743
The message sent to all windows when the Windows+M key is processed is WM_WINDOWPOSCHANGING.
Handle that message and you'll capture it.
0
 

Author Comment

by:tomcorcoran
ID: 16950358
That message gets called at startup, how do I filter just Win+m in it?
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 16952144
no way.
0
 

Author Comment

by:tomcorcoran
ID: 16958170
There is no solution for what I am trying to do then?
0
 
LVL 10

Expert Comment

by:atul_parmar
ID: 16958219
Hi,

what'z problem with WM_SHOWWINDOW when the window is minimized its wParam has 0 so you can easily trap it.
0
 
LVL 10

Accepted Solution

by:
atul_parmar earned 200 total points
ID: 16958232
declare a message procedure e.g.
    procedure OnMinimize(var Msg : TMessage); message WM_SHOWWINDOW;
then implement it as

procedure TForm1.OnSize(var Msg: TMessage);
begin
  if Msg.WParam = 0 then
  begin
    // your implementation
  end
  else
    inherited;
end;
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

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 I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

670 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