Add(Button,15495593,210,321)
{
Left=430
Top=335
Width=140
Height=35
Caption="PrintWindow"
link(onClick,9606902:doScr,[])
}
Add(InlineCode,9606902,371,321)
{
WorkPoints=#5:doScr|
EventPoints=#5:onScr|
DataPoints=#7:in_hwnd|
Code=#15:unit HiAsmUnit;|0:|9:interface|0:|32:uses Windows, kol, Share, Debug;|0:|4:type|28: THiAsmClass = class(TDebug)|10: private|0:|9: public|24: in_hwnd: THI_Event;|22: onScr: THI_Event;|47: procedure doScr(var dt: TData; idx: word);|5: end;|1: |95: function PrintWindow(HWND:HWND;hdcBlt:HDC;nFlags:DWORD):BOOL; stdcall; external 'user32.dll';|2: |14:implementation|0:|28:procedure THiAsmClass.doScr;|3:var|15: rcSrc: TRect;|16: hSrcWnd: HWND;|16: tBmp: PBitmap;|5:begin|37: hSrcWnd := ToIntegerEvent(in_hwnd);|32: GetWindowRect(hSrcWnd, rcSrc);|72: tbmp := NewBitmap(rcSrc.Right - rcSrc.Left, rcSrc.Bottom - rcSrc.Top);|49: PrintWindow(hSrcWnd, tbmp.Canvas.Handle, 0); |28: _hi_onEvent(onScr, tbmp); |12: tbmp.Free;|4:end;|0:|4:end.|
}
Add(ChildForm,13789484,553,132)
{
}
BEGIN_SDK
Add(EditMulti,8916653,21,21)
{
WorkCount=1
link(doWork1,1836660:doEvent1,[(42,27)(42,76)])
}
Add(MainForm,7545100,203,133)
{
Left=35
Top=105
Width=547
Height=316
Color=0
Visible=1
Caption="Снимок окна"
Point(doVisible)
}
Add(Image,12620809,203,70)
{
Width=529
Height=271
Align=5
Color=0
}
Add(DoData,14735024,140,161)
{
Data=Integer(1)
link(onEventData,7545100:doVisible,[])
}
Add(Hub,1836660,63,70)
{
link(onEvent1,12620809:doLoad,[])
link(onEvent2,14735024:doData,[(115,83)(115,167)])
}
END_SDK
Add(MainForm,2953706,203,21)
{
Width=609
Height=430
}
Ответов: 5227
Рейтинг: 587
|
|||
germes5558, окно может быть не скрыто но выведено за пределы видимости экрана
|
|||
карма: 4 |
|