Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Основная";
Текущий архив: 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
3-53362
jenya_d
2004-01-27 14:45
2004.02.17
регистрация действий пользователя в базе данных


14-53748
BOA_KAA
2004-01-28 11:27
2004.02.17
Proxy для WIndows


7-53782
mrAld
2003-11-30 21:29
2004.02.17
Delphi и MMX


1-53581
maxic
2004-02-08 18:56
2004.02.17
Статус окна


4-53820
FBI
2003-12-08 09:41
2004.02.17
Активное окно





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский