procedure TForm1.Button1Click(Sender: TObject);//透明<br>begin<br> SetWindowLong(Self.Handle, GWL_EXSTYLE, WS_EX_LAYERED);<br> SetLayeredWindowAttributes(Self.Handle, 0, 128, 2);<br>end;<br><br>procedure TForm1.Button2Click(Sender: TObject);//恢复<br>begin<br> SetWindowLong(Self.Handle, GWL_EXSTYLE, WS_EX_LAYERED);<br> SetLayeredWindowAttributes(Self.Handle, 1, 0, 1);<br>end;