13,871
社区成员




#include <vcl.h>
#pragma hdrstop
#include "UnitEx5.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormCreate(TObject *Sender)
{
long lRt = GetWindowLong(Handle, GWL_EXSTYLE);
lRt = lRt | WS_EX_LAYERED;
SetWindowLong(Handle, GWL_EXSTYLE, lRt);
SetLayeredWindowAttributes(Handle, clBlue, 200, LWA_ALPHA);
}
#include <vcl.h>
#pragma hdrstop
#include "UnitEx5.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormCreate(TObject *Sender)
{
long lRt = GetWindowLong(Handle, GWL_EXSTYLE);
lRt = lRt | WS_EX_LAYERED;
SetWindowLong(Handle, GWL_EXSTYLE, lRt);
::SetLayeredWindowAttributes(Handle, clBlue, 200, LWA_ALPHA);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::TrackBar1Change(TObject *Sender)
{
//this->AlphaBlend = true;
//this->AlphaBlendValue = TrackBar1->Position;
//this->Refresh();
::SetLayeredWindowAttributes(Handle, clBlue, TrackBar1->Position, LWA_ALPHA);
}
//---------------------------------------------------------------------------