Reputation: 21
I need develop an application (Delphi) that never receive the focus, I use the DLL to display the video on second monitor (I found in Torrys Delphi - Dr.SAGURA Media Player v.1.0) that receive the focus every time play the video, how avoid this ?
I try :
procedure TForm.WMActivate(var Msg: TWMActivate);
begin
WA_ACTIVE :
begin
Msg.Result := 0;// cancel focus
end;
end;
Unsuccessful !
Thanks Jean Alysson
Upvotes: 2
Views: 1043
Reputation: 13312
The first two items hide the application from the taskbar and the Alt+Tab list and the last keeps it from gaining focus when it's shown and when clicking on it.
Upvotes: 3
Reputation: 1336
What's the intention behind not be focusable? You want to avoid the user from closing/minimize/maximize the window? Maybe your need can be acomplished understanding the real problem.
Maybe having a sevice instead of a regular application can make the trick.
Upvotes: 0