Bothered me for a while

  spikeychris 20:08 14 Dec 03
Locked

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?

Chris

  Jester2K II 20:11 14 Dec 03

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!!".

  VoG II 20:15 14 Dec 03

"should you click and then think "Oh no!!"."

Which happens rather a lot in my case!

  Pesala 20:15 14 Dec 03

is used to move buttons on the taskbar too.

  Djohn 20:16 14 Dec 03

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.

  Jester2K II 20:19 14 Dec 03

Good point!!!

  woodchip 20:19 14 Dec 03

and hear

  spikeychris 20:35 14 Dec 03

Ahhso. Just ran a search for the first time and it appears it can be changed...might have a bash.

  Jester2K II 20:46 14 Dec 03

What?

How?

  spikeychris 10:54 15 Dec 03

2K when I said I'd have a bash...well I'd like to change my mind if thats alright. Looks like it can be done but its a handful.

Trapping the WM_MOUSEACTIVATE message that is send to
the control when the user clicks on it with the mouse.

The format will be lost on here but who the hell cares...?

private
{ Private declarations }
FOldControlMessageHandler: TWndMethod;
Procedure ControlMessageHandler( Var msg: TMessage );

In implementation:

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;

Thats just a teeny weeny part of it.

  recap 11:15 15 Dec 03

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.

This thread is now locked and can not be replied to.

How to get Windows 10 for free | How to install Windows 10: There is still a way to avoid paying…

1995-2015: How technology has changed the world in 20 years

Alex Chinneck’s giant ice cube Christmas tree at Kings Cross

Apple rumours & predictions 2017: The iPhone 8, new iPads, and everything else you should expect fr7…