English
Source / code snippets

Bildschirmfoto create Screenshot - 2

 

CompileMarkSeparation
Source wurde am 15.07.2007 aus der MMJ-Quellcodesammlung (Dietmar Horn) in die Babyklappe auf XProfan.Com abgelegt:
ScreenShot erstellen (Bildschirmfoto)
+----------------------------------------------------------+
| screenshot.prf                                           |
| Autor: Sebastian König                                   |
| email: feedback@sekoenig.de                              |
| Homepage: http://www.sekoenig.de                         |
| Erstellen eines echten Screenshots mit Profan. Wirkt   |
| wie ein Druck auf die [PRINT]-Taste. Der Screenshot wird |
| als Bitmap in die Zwischenablage kopiert.                |
+----------------------------------------------------------+
--Benötigte API-Funktionen
DEF GetDC(1) !USER32,GetDC
DEF CreateCompatibleDC(1) !GDI32,CreateCompatibleDC
DEF CreateCompatibleBitmap(3) !GDI32,CreateCompatibleBitmap
DEF SelectObject(2) !GDI32,SelectObject
DEF BitBlt(9) !GDI32,BitBlt
DEF GetCurrentObject(2) !GDI32,GetCurrentObject
DEF OpenClipboard(1) !USER32,OpenClipboard
DEF EmptyClipboard(0) !USER32,EmptyClipboard
DEF SetClipboardData(2) !USER32,SetClipboardData
DEF CloseClipboard(0) !USER32,CloseClipboard
DEF DeleteObject(1) GDI32,DeleteObject
DEF DeleteDC(1) !GDI32,DeleteDC
DEF ReleaseDC(2) !USER32,ReleaseDC

proc Screenshot

    --Deklarationen
    declare hdc&, hmdc&, hbitmap&
    declare maxX%, maxY%
    let maxX% = %maxX
    let maxY% = %maxY
    let hdc& = GetDC(0)
    let hmdc& = CreateCompatibleDC(hdc&)
    let hbitmap& = CreateCompatibleBitmap(hdc&,maxX%,maxY%)
    SelectObject(hmdc&, hbitmap&)
    BitBlt(hmdc&, 0, 0, maxX%, maxY%, hdc&, 0, 0, $0CC0020)
    let hbitmap& = GetCurrentObject(hmdc&, 7)
    OpenClipboard(0)
    EmptyClipboard()
    SetClipboardData(2, hbitmap&)
    CloseClipboard()
    DeleteObject(hbitmap&)
    DeleteDC(hmdc&)
    ReleaseDC(0,hdc&)

endproc

Screenshot
Messagebox(Fertig,Screenshot,0)
/../function-references/XProfan/end/'>end
 
07/16/07  
 



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

1.682 Views

Untitledvor 0 min.
Thomas Freier04/29/21
AndreasS01/19/19
H.Brill12/30/16
Tommy08/10/16
More...

Themeninformationen

this Topic has 1 subscriber:

unbekannt (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