Answer the question
In order to leave comments, you need to log in
How to make a phantom window in Delphi?
How to make a window in Delphi, but so that the cursor (i.e. click) passes "through it", as, for example, in the volume indicator on laptops?
Answer the question
In order to leave comments, you need to log in
1. Turn on the AlphaBlend property. Even if you want an opaque window, turn it on anyway.
2. Redefine two functions.
procedure TfmMain.CreateParams(var Param : TCreateParams); // override
begin
inherited;
Param.ExStyle := Param.ExStyle or WS_EX_TRANSPARENT;
end;
procedure TfmMain.WmNcHitTest(var Msg : TWMNCHitTest); // message WM_NCHITTEST;
begin
Msg.Result := HTTRANSPARENT;
end;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question