I have a semi transparent fullscreen form and I need can control my computer over this form.
Actualy we need red screen filter on computer for observing the sky, but we don't want to use something like red plexiglass.
I tried Windows API's (Monitor Configuration Functions) http://msdn.microsoft.com/en-us/library/windows/desktop/dd692964(v=vs.85).aspx but I can't do it. I did transparent form like red filter (everything seems Red and Black tones), but I can't control computer over my form. Anybody help me about that ?
It operates in two modes, Transparent and Active, and starts up in Transparent mode. If you click the mouse anywhere in the window, the click falls through to the window behind it. To make the sample window Active, make sure the form has the focus by clicking on its icon in the TaskBar, then hold down the Shift and Ctrl keys.
It appears that a form is transparent, "all or nothing"! In order to get a form to be "click-throughable", you have to modify the Extended Style attributes of the window that is your form. How do we do that?
_InitialStyle = GetWindowLong ( Me .Handle, GWL.ExStyle) ' Set this window to Transparent ' (to the mouse that is!) SetFormToTransparent () ' Just for giggles, set this window ' to stay on top of all others so we ' can see what's happening.
Please Sign up or sign in to vote. A WTL class that will make any window transparent and allow mouse clicks to pass through the window in Windows 2000 and XP. In the December 2005 column of the MSDN magazine Paul DiLascia explained how to create a so called "layered" window which is transparent and passes mouse events through itself.
Create a new VCL project. In the properties of the main form, set Color
to clRed
, AlphaBlend
to true
, AlphaBlendValue
to 127
, WindowState
to wsMaximized
, FormStyle
to fsStayOnTop
, and add the following code:
type
TForm1 = class(TForm)
private
protected
procedure CreateParams(var Params: TCreateParams); override;
...
procedure TForm1.CreateParams(var Params: TCreateParams);
begin
inherited;
Params.ExStyle := Params.ExStyle or WS_EX_LAYERED or WS_EX_TRANSPARENT;
end;
(Sample video, Sample compiled EXE, Source)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With