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

Вниз

Глючит ли Имага?   Найти похожие ветки 

 
loky ©   (2004-09-16 16:18) [0]

procedure TForm1.Button2Click(Sender: TObject);
var
 d: hdc;
 i: integer;
begin
 D:=getdc(0);
 bitblt(Image1.Canvas.Handle,0,0,Image1.Width,image1.Height,d,0,0,SRCCOPY);
 i:=0;
 while FileExists(IntToStr(i)+".bmp") do inc(i);
 Image1.Picture.SaveToFile(IntToStr(i)+".bmp");
// ReleaseDC(0, d); - не нужна (кажется)
end;

В результате нулевая бмп-ха нормальная, а все последующие - со съехавшей палитрой. Из-за чего???
На имаге все нормально.


 
Рыба ©   (2004-09-16 18:40) [1]

procedure TForm1.Button2Click(Sender: TObject);
var
 d: hdc;
 i: integer;
 Bmp: TBitmap;
begin
 Bmp := TBitmap.Create;
 try
   Bmp.Width := Screen.Width;    
   Bmp.Height := Screen.Height;
   Bmp.PixelFormat := pf24Bit;
   D:=getdc(0);
   bitblt(Bmp.Canvas.Handle,0,0,Bmp.Width,Bmp.Height,d,0,0,SRCCOPY);
   i:=0;
   while FileExists(IntToStr(i)+".bmp") do inc(i);
   Bmp.SaveToFile(IntToStr(i)+".bmp");
   ReleaseDC(0, d); { нужна кажется :)) }
 finally
   Bmp.Free;
 end;
end;


 
Mihey_temporary ©   (2004-09-16 21:37) [2]

Исользуй Canvas.Handle и SaveToFile от Image1.Picture.Bitmap.


 
loky ©   (2004-10-01 15:30) [3]

Санкс попробую!



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

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

Наверх




Память: 0.47 MB
Время: 0.029 c
3-1102361262
sloug
2004-12-06 22:27
2005.01.02
Колонки в DBGrid


14-1103112294
Dmitriy O.
2004-12-15 15:04
2005.01.02
Compact using !


3-1102192734
_Dragon
2004-12-04 23:38
2005.01.02
Readonly после сортировки


1-1103478929
Паша555
2004-12-19 20:55
2005.01.02
TAdvSringGrid & Excel


3-1102426786
Александр В
2004-12-07 16:39
2005.01.02
Как прервать ADOQuery.Open?