Главная страница
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.02 c
1-53459
Goida
2004-02-06 13:54
2004.02.17
Стоит ли освобождать объекты WordApplication и WordDocument?


1-53527
PVOID
2004-02-05 13:23
2004.02.17
форма и thread


3-53393
Janbolat
2004-01-27 08:54
2004.02.17
Печать из базы


8-53657
hi4kok
2003-10-20 03:09
2004.02.17
как реализовать вид из окна машиниста? деревья,рельсы и проч?


3-53422
ERDEN
2004-01-26 07:34
2004.02.17
Вопрос по ExcelApplication