mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 18:57:28 -07:00
Fixed DWM capture for Metro (Modern UI) Apps by not placing it in the foreground.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2248 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
ae8c007528
commit
180cc1c661
1 changed files with 8 additions and 4 deletions
|
@ -865,8 +865,10 @@ namespace GreenshotPlugin.Core {
|
|||
tempForm.BackColor = Color.Black;
|
||||
// Make sure everything is visible
|
||||
tempForm.Refresh();
|
||||
// Make sure the application window is active, so the colors & buttons are right
|
||||
ToForeground();
|
||||
if (!isMetroApp) {
|
||||
// Make sure the application window is active, so the colors & buttons are right
|
||||
ToForeground();
|
||||
}
|
||||
// Make sure all changes are processed and visisble
|
||||
Application.DoEvents();
|
||||
using (Bitmap blackBitmap = WindowCapture.CaptureRectangle(captureRectangle)) {
|
||||
|
@ -895,8 +897,10 @@ namespace GreenshotPlugin.Core {
|
|||
}
|
||||
// Make sure everything is visible
|
||||
tempForm.Refresh();
|
||||
// Make sure the application window is active, so the colors & buttons are right
|
||||
ToForeground();
|
||||
if (!isMetroApp) {
|
||||
// Make sure the application window is active, so the colors & buttons are right
|
||||
ToForeground();
|
||||
}
|
||||
// Make sure all changes are processed and visisble
|
||||
Application.DoEvents();
|
||||
// Capture from the screen
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue