English
Forum

Done: Screenshot WITHOUT the Program-Window

 
- Page 1 -



Sven
Bader
has someone a Solution in its Fundus, a Screenshot without the actually Program-Window To make or. particularly a Screenshot from the what straight under my Program-Window is To make?

what I so vorhabe?
I work plenty with disengaged Fensterformen, with them The Kanten unfortunately always angefressen looks because of fehlendem Antialiasing. now have I a Solution program, which with of/ one Alphamaske The Pixel in the Randbereich properly with the background mix and so weiche Kanten created. Problems there then, if itself the background changes or I the window only one small Piece shift - therefore need I a Screenshot from the what under the Program-Window is.

If it then time functions, place I the code gladly available
 
10/05/09  
 



 
- Page 1 -



Andreas
Miethe


iF, Beitrag=54398, Zeitpunkt=06.10.2009
Hehe nice, very, I had me already consider, The Window simply itself draw To let or. The drawing abzukopieren.

I knew The user32s PrintWindow function not at all, simply super Andreas!


thanks !

and here another example for all visible Window without the Own. ought to then well the his what there sought watts ?
Vieleicht can the whole another little optimiert go.
CompileMarkSeparation
 $H Windows.ph
 $H Messages.ph
Struct RECT = left&,top&,right&,bottom&
cls

Proc GetDesktop

    Declare h&
    h& = ~FindWindow("Progman",0)
    h& = ~FindWindowEx(h&, 0, "SHELLDLL_DefView",0)
    h& = ~FindWindowEx(h&, 0, "Internet Explorer_Server",0)

    if h& > 0

        Return h&

    else

        h& = ~FindWindow("Progman",0)
        h& = ~FindWindowEx(h&, 0, "SHELLDLL_DefView",0)
        h& = ~FindWindowEx(h&, 0, "SysListView32",0)
        Return h&

    endif

EndProc

erstmal ein DC für den Bildschirm
Var C_DC& = ~CreateCompatibleDC(%hdc)
Var C_Bitmap& = ~CreateCompatibleBitmap(%hdc,%maxx,%maxy)
~SelectObject(C_DC&,C_Bitmap&)
~ReleaseDC(C_DC&)
~SetStretchBltMode(C_DC&,~COLORONCOLOR)
FensterArray anlegen
DECLARE Windows&[],Anzahl&
sichtbare Fenster durchnumerieren
~EnumWindows(ProcAddr("NumWins",2),0)
zusammenblitten
MakePicture()
und gestreckt ins Fenster
~StretchBlt(%hdc2,0,0,width(%hwnd),height(%hwnd),C_DC&,0,0,%maxx,%maxy,~srccopy)
Repaint
~DeleteObject(C_Bitmap&)
~DeleteDC(C_DC&)
Waitinput
End

Proc Numwins

    Fensterhandle in Array
    Parameters wnd&,lParam&
    das eigene Fenster ausnehmen

    If ~IsWindowVisible(Wnd&) And (Wnd& <> %hwnd)

        Windows&[Anzahl&] = wnd&
        Inc Anzahl&

    Endif

    Return 1

EndProc

Proc MakePicture

    zusammenblitten
    Var R# = New(Rect)
    Declare W&,H&,DC&,Bitmap&
    in umgekehrter Reihenfolge

    Whileloop Anzahl&-1,0,-1

        ~GetWindowRect(Windows&[&Loop],R#)
        W& = Int(R#.right&-R#.left&)
        H& = Int(R#.bottom&-R#.top&)
        DC& = ~CreateCompatibleDC(%hdc)
        Bitmap& = ~CreateCompatibleBitmap(%hdc,W&,H&)
        ~SelectObject(DC&,Bitmap&)
        ~ReleaseDC(DC&)
        External("user32.dll","PrintWindow",Windows&[&Loop],DC&,0)
        ~Bitblt(C_DC&,R#.left&,R#.top&,R#.Right,R#.bottom&,DC&,0,0,~srccopy)
        ~DeleteObject(Bitmap&)
        ~DeleteDC(DC&)

    Endwhile

    Di
/a> R# ENDPROC
 
Gruss
Andreas
________ ________ ________ ________ _
Profan 3.3 - XProfanX2
Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit
ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher
Homepage :  [...] 
10/06/09  
 



 
- Page 2 -



Dieter
Zornow
means with functions The thing unfortunately not so cool. it'll one quite zerstörter screen leave behind, whom I with terminate or started one Program again produce must. too The Taskbar must I through run over the items again produce.
 
Er ist ein Mann wie ein Baum. Sie nennen ihn Bonsai., Win 7 32 bit und Win 7 64 bit, mit XProfan X2
10/07/09  
 



could You of Unheil a Screenshot make?
 
10/07/09  
 




Andreas
Miethe


Dieter Zornow, Beitrag=54400, Zeitpunkt=07.10.2009
means with functions The thing unfortunately not so cool. it'll one quite zerstörter screen leave behind, whom I with terminate or started one Program again produce must. too The Taskbar must I through run over the items again produce.


sees so from, that some system-Window of XP with PrintWindow not get by.under Vista works it without Problems.
The Ansatz ought to but correctly. his. it must hold another gescheiter filter for system-Window mere.
 
Gruss
Andreas
________ ________ ________ ________ _
Profan 3.3 - XProfanX2
Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit
ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher
Homepage :  [...] 
10/07/09  
 




Sven
Bader
The Ansatz is very interestingly. I befürchte unfortunately, that it on strength and speed mangelt. i'm the following noticed:

XP:
-The Desktop becomes always Black displayed
-All windows are "zerstört" and must neugezeichnet go

Vista:
-The rights Half the Desktops becomes Black displayed
-Fensterschatten go not displayed
 
10/08/09  
 




Andreas
Miethe


Sven Bader, Beitrag=54407, Zeitpunkt=08.10.2009
The Ansatz is very interestingly. I befürchte unfortunately, that it on strength and speed mangelt. i'm the following noticed:

XP:
-The Desktop becomes always Black displayed
-All windows are "zerstört" and must neugezeichnet go

Vista:
-The rights Half the Desktops becomes Black displayed
-Fensterschatten go not displayed


Hello Sven,
then have I yet something Interessantes for you. so can You too free Fensterformen make.

110 kB
Hochgeladen:10/18/09
Downloadcounter187
Download
 
Gruss
Andreas
________ ________ ________ ________ _
Profan 3.3 - XProfanX2
Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit
ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher
Homepage :  [...] 
10/18/09  
 




Frank
Abbing
has ReleaseDC() not two Parameter?
 
10/20/09  
 



clear 2 [...]  . what me over ands over again on it reminds, that our HeaderFiles unfortunately no Parameterdefinitionen imply so one not automatically to check on let can.
 
10/20/09  
 




Andreas
Miethe


Hello together,
the whole is really very simply, if one it because knows.
BitBlt ignoring Layered-windows.
means the window simply layered make and already goes the Screenshot without the window.

@Frank, You reads Yes here with, the concerns too your Shooter-Tool,
want You so too Layered-windows round up then must the Bitblt-Flag circa ~CAPTUREBLT extended go.
CompileMarkSeparation
 $H Windows.ph
window %maxx/4,%maxy/4-%maxx/2,%maxy/2
SetStyle %Hwnd,1, GetStyle(%hwnd,1) | $80000
External("User32.dll","SetLayeredWindowAttributes",%hwnd,0,255,2)
waitinput
Var ScreenDC& = ~CreateDC("DISPLAY",0,0,0)
Var NB& =Create("hNewPic",%maxx,%maxy,0)
Startpaint nb&
~BitBlt(%hdc,0,0,%maxx,%maxy,ScreenDC&,0,0,~srccopy)
EndPaint
~DeleteDC(ScreenDC&)
DrawSizedPic NB&,0,0-width(%hwnd),Height(%hwnd);0
waitinput
Gruss
Andreas
________ ________ ________ ________ _
Profan 3.3 - XProfanX2
Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit
ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher
Homepage :  [...] 
10/25/09  
 




Frank
Abbing

@Frank, You reads Yes here with, the concerns too your Shooter-Tool,
want You so too Layered-windows round up then must the Bitblt-Flag circa ~CAPTUREBLT extended go.


thanks for Info! be into last Meet on whom Flag bumped, is really interestingly. look time, here use I it erstmals: [...] 
 
10/25/09  
 




Andreas
Miethe


have I chasing, very interestingly.

with is it noticed with my Screenshot-Tool and of my new Desktopuhr ( is yet in the Betastadium ), The watts neither eingefangen.

63 kB
Hochgeladen:10/25/09
Downloadcounter161
Download
 
Gruss
Andreas
________ ________ ________ ________ _
Profan 3.3 - XProfanX2
Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit
ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher
Homepage :  [...] 
10/25/09  
 




Frank
Abbing
will be with opportunity Change, if I whom Shooter-code again open Have.
 
10/25/09  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

15.549 Views

Untitledvor 0 min.
Member 5044459 vor 5 Tagen
Sven Bader03/09/21
kustg12/11/19
AndreasS12/17/18
More...

Themeninformationen



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