Форум: "Основная";
Текущий архив: 2004.02.17;
Скачать: [xml.tar.bz2];
Вниз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;
Скачать: [xml.tar.bz2];
Память: 0.45 MB
Время: 0.009 c