Let the form still displayed on the desktop after the "Show Desktop" is executed ...

xiaoxiao2021-03-05  21

Yesterday, I saw a question on DFW, requiring the program window (on the desktop); click "Show Desktop" or on the desktop ", ponder it, realize" Let the form is executed. ' Show the desktop 'is still displayed on the desktop ", the code is as follows:

unit Unit1; interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms; type TForm1 = class (TForm) private {Private declarations} procedure WndProc (var Message: TMessage); override; // public {Public reload declarations} end; var Form1: TForm1; implementation {$ R * .dfm} procedure TForm1.WndProc (var Message: TMessage); var WndPosFlag: Integer; begin if Message.Msg = WM_SHOWWINDOW then begin if Message.WParam = 0 then begin End; end; end;

but. . . . . . There is a premise: form properties formstyle = fsstayonto This is inevitable. . . So can't stay in all forms last

SPY has been working for a long time, or I didn't want to understand why the FormStyle property is fxnormal when the WM_SHOWINDOW message is not cut in the program. . . When the breakpoint is debugged, it can be intercepted for the first time, and then there is no more cut, and the magical thing is that the pro program is clearly received by the WM_SHOWINDOW message (and the message value is also the same)

Khan ING .....

转载请注明原文地址:https://www.9cbs.com/read-36149.html

New Post(0)