English
Source / code snippets

Area Bildschirmfoto lever Screenshot

 

Julian
Schmidt

DEF CreateCompatibleBitmap(3) !"GDI32","CreateCompatibleBitmap"

Proc CaptureWindow

    Parameters handle&
    External("USER32","SetForegroundWindow",handle&)
    Sleep 200
    External("USER32","keybd_event",$2C,0,0,0)
    Case handle&<>0 : External("USER32","keybd_event",$2C,1,0,0)
    MCLS %maxX,%maxY
    StartPaint -1
    ClipLoadBmp 0,0;0
    ClearClip
    EndPaint
    Var hpic&=Create("hNewPic", %BmpX, %BmpY, 0)
    StartPaint hpic&
    MCopyBmp 0,0-%maxX,%maxY > 0,0;0
    EndPaint
    Return hpic&

ENDPROC

Proc CaptureArea

    Parameters xpos%,ypos%,maxX!,maxY!
    Var hdc& = External("USER32","GetDC",0)
    Var hmdc& = External("GDI32","CreateCompatibleDC",hdc&)
    Var hbitmap& = CreateCompatibleBitmap(hdc&,maxX!,maxY!)
    External("GDI32","SelectObject",hmdc&, hbitmap&)
    External("GDI32","BitBlt",hmdc&, 0, 0, maxX!, maxY!, hdc&, xpos%, ypos%, $0CC0020)
    hbitmap& = External("GDI32","GetCurrentObject",hmdc&, 7)
    External("GDI32","DeleteDC",hmdc&)
    External("USER32","ReleaseDC","USER32","ReleaseDC")
    Return hbitmap&

ENDPROC

Cls
DrawSizedPic CaptureWindow(0), 0, 0 - width(%hwnd), height(%hwnd); 0'Ganzer Bildschirn
Waitinput
DrawSizedPic CaptureWindow(%hwnd), 0, 0 - width(%hwnd), height(%hwnd); 0'Window
Waitinput
DrawSizedPic CaptureArea(0,0,width(%hwnd),height(%hwnd)), 0, 0 - width(%hwnd), height(%hwnd); 0'Region
Waitinput
 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
09/15/12  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

5.819 Views

Untitledvor 0 min.
ByteAttack11/27/23
Walter04/11/23
p.specht11/21/21
R.Schneider11/20/21
More...

Themeninformationen

this Topic has 1 subscriber:

Julian Schmidt (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie