mirror of
https://github.com/greenshot/greenshot
synced 2025-07-13 16:43:54 -07:00
Code cleanup, removed a lot of FxCop messages and added some more disposing.
This commit is contained in:
parent
49869a2630
commit
15253ef295
18 changed files with 119 additions and 335 deletions
|
@ -1366,7 +1366,7 @@ namespace GreenshotPlugin.Core {
|
|||
}
|
||||
returnImage = new Bitmap(windowRect.Width, windowRect.Height, pixelFormat);
|
||||
using (Graphics graphics = Graphics.FromImage(returnImage)) {
|
||||
using (SafeDeviceContextHandle graphicsDC = graphics.getSafeDeviceContext()) {
|
||||
using (SafeDeviceContextHandle graphicsDC = graphics.GetSafeDeviceContext()) {
|
||||
bool printSucceeded = User32.PrintWindow(Handle, graphicsDC.DangerousGetHandle(), 0x0);
|
||||
if (!printSucceeded) {
|
||||
// something went wrong, most likely a "0x80004005" (Acess Denied) when using UAC
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue