Недавно добавленные исходники

•  Animation Loaders  967

•  DeLiKaTeS Tetris (Тетрис)  5 900

•  TDictionary Custom Sort  7 851

•  Fast Watermark Sources  7 520

•  3D Designer  10 750

•  Sik Screen Capture  8 078

•  Patch Maker  8 280

•  Айболит (remote control)  8 327

•  ListBox Drag & Drop  7 167

•  Доска для игры Реверси  101 123

•  Графические эффекты  8 393

•  Рисование по маске  7 770

•  Перетаскивание изображений  6 363

•  Canvas Drawing  6 739

•  Рисование Луны  6 669

•  Поворот изображения  5 799

•  Рисование стержней  4 745

•  Paint on Shape  3 445

•  Генератор кроссвордов  4 435

•  Головоломка Paletto  3 579

•  Теорема Монжа об окружностях  4 376

•  Пазл Numbrix  2 836

•  Заборы и коммивояжеры  3 788

•  Игра HIP  2 553

•  Игра Go (Го)  2 559

•  Симулятор лифта  2 950

•  Программа укладки плитки  2 377

•  Генератор лабиринта  3 127

•  Проверка числового ввода  2 610

•  HEX View  3 014

 
скрыть

  Форум  

Delphi FAQ - Часто задаваемые вопросы

| Базы данных | Графика и Игры | Интернет и Сети | Компоненты и Классы | Мультимедиа |
| ОС и Железо | Программа и Интерфейс | Рабочий стол | Синтаксис | Технологии | Файловая система |



Delphi Sources

Как отловить CLX форму



{
  Capturing a CLX form is easy, once you know.
  It took me a little time to find out, so I'm giving the knowledge to help others :
}

type
  TFormCapturable = class(TForm)
  public
    procedure PrintOne;
  end;

var
  FormCapturable: TFormCapturable;

implementation

uses
  Qt;

procedure TFormCapturable.PrintOne;
var
  aBitmap: TBitmap;
  aWinHandle: QWidgetH;
  aWinId: Cardinal;
  x, y, w, h: integer;
begin
  // create a new bitmap to hold the captured screen
  aBitMap := TBitmap.Create;
  try
    // get a handle on the desktop
    aWinHandle := QApplication_desktop;
    // get the Id from the desktop handle
    aWinId := QWidget_winId(aWinHandle);
    // get the position and size of the windows
    x := Self.Left;
    y := Self.Top;
    w := Self.Width;
    h := Self.Height;
    // capture the window into the bitmap's pixmap
    QPixmap_grabWindow(aBitmap.Handle, aWinId, x, y, w, h);
    // save the bitmap
    aBitMap.SaveToFile('c:\temp\test.bmp');
  finally
    // don't forget to kill the bitmap after use.
    FreeAndNil(aBitMap);
  end;
end;




Похожие по теме исходники

Рисование математических формул




Copyright © 2004-2026 "Delphi Sources" by «SiteAnalyzer». Delphi World FAQ

Группа ВКонтакте