Ok, you press an icon on the toolbar (Internet explorer will do) but you hold down the mouse button and then move the mouse away and release...why does the function not occur? why must you release the button whilst positioned on the icon? This applies with all Windows one click icons?
Because the button looses focus when you remove the mouse from the button. Once you click the action isn't done until you release the button. I supposse its there to give you a way out should you click and then think "Oh no!!".
Yep! very useful to remember if you click on delete and didn't mean too! Just move the cursor off the button then let go. I first found this when playing Freecell and then tried it out on other applications.
procedure TForm1.Button2Click(Sender: TObject); begin If Assigned( FOldControlMessagehandler ) Then richedit1.WindowProc := FOldControlMessagehandler Else Begin FOldControlMessagehandler := richedit1.WindowProc; richedit1.WindowProc := ControlMessageHandler; End; End;
Procedure TForm1.ControlMessageHandler( Var msg: TMessage ); Begin If (msg.Msg = WM_MOUSEACTIVATE) and (ActiveControl <> richedit1) Then Begin msg.result := MA_ACTIVATEANDEAT; richedit1.setfocus; End Else FOldControlMessageHAndler( msg ); End;
spikeychris, I think it is a get out clause so to speak as VoG says "should you click and then think "Oh no!!"."
There was a chap that I used to work with that opened up numerous programs by mistake until I told him of this option. Now it take him around 20 sec to open a program because he mulls over whether he wants that particular program or not.