Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2004.02.17;
Скачать: CL | DM;

Вниз

ShellListView   Найти похожие ветки 

 
don_dampster ©   (2004-02-07 08:12) [0]

Доброго времени суток.
ShellListView1 размещён на всей клиентской области формы. Задача: сделать ShellListView1 и форму прозрачной, или чтобы был виден фон рабочего стола.
Заранее благодарен.


 
TUser ©   (2004-02-07 10:12) [1]

Вот пример из проекта с procoder.ru
procedure TMyForm.CopyButtonClick(Sender: TObject);
var
newBitmap: TBitmap; // We need this to work with.
ScreenDC: HDC; // This will let us access the "desktop".
REOrg: TPoint; // Origin of our Form"s client area.
X,Y: Integer; // Holds coordinates.
P,I,M: PByteArray; // For faster (than Pixels[]) access.
begin
// Create a new bitmap:
newBitmap:=TBitmap.Create;
try
// Now assign this bitmap to our image:
MyImage.Picture.Graphic:=newBitmap;
// Get our form"s width/height for the new image:
MyImage.Picture.Graphic.Width:=MyForm.ClientWidth;
MyImage.Picture.Graphic.Height:=MyForm.ClientHeight;
// Get the forms origin:
REOrg:=MyForm.ClientToScreen(Point(0,0));
// Allow access to the desktop:
ScreenDC:=GetDC(0);
try
// Copy the desktop area under the form, to our image:
BitBlt(MyImage.Picture.Bitmap.Canvas.Handle,0,0,MyForm.ClientWidth,MyForm.ClientHeight,ScreenDC,REOrg.X, REOrg.Y, SRCCOPY);
finally
// Release the desktop DC again:
ReleaseDC(0, ScreenDC);
end;
finally
// Release our temporary bitmap:
newBitmap.Free;
end;
// Convert our images to true colour:
MyImage.Picture.Bitmap.HandleType:=bmDIB;
MyImage.Picture.Bitmap.PixelFormat:=pf24Bit;
LogoMap.Picture.Bitmap.HandleType:=bmDIB;
LogoMap.Picture.Bitmap.PixelFormat:=pf24Bit;
LogoMask.Picture.Bitmap.HandleType:=bmDIB;
LogoMask.Picture.Bitmap.PixelFormat:=pf24Bit;
// Process the pixels:
For Y:=0 to Height-1 do begin
P:=MyImage.Picture.Bitmap.ScanLine[Y];
I:=LogoMap.Picture.Bitmap.ScanLine[Y];
M:=LogoMask.Picture.Bitmap.ScanLine[Y];
For X:=0 to (Width)*3-1 do
P[X]:=(P[X]*(256-M[X])+I[X]*(M[X])) div 256;
end;
// Make the image visible:
MyImage.Visible:=True;
end;



Страницы: 1 вся ветка

Текущий архив: 2004.02.17;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.012 c
7-53789
~DR~
2003-12-01 11:38
2004.02.17
создание виртуального устройства


14-53725
Agent[007]
2004-01-26 18:55
2004.02.17
TStrings


14-53734
kull
2004-01-30 13:00
2004.02.17
Этолт безумный мир...


9-53353
prihod
2003-08-05 12:42
2004.02.17
Оцените мою новую игрушку


1-53544
denis24
2004-02-05 12:33
2004.02.17
Размщение контролов на форме при разном разрешении экрана