Get Snipping Tool to Open Maximized?


Aussie spelling. We often replace with an S what American English uses a Z for. Because life’z complicated.
Actually - and I learned this when I was an American expat/Sydneysider... The "Z" is actually the British spelling.

In the mid 19th-Century, there was a period when England went through a major crush on French culture and adopted the French use of the "S". Because we Yanks had already broken from the Crown, we stuck with what we had.

So we're using the older, more English version. You Ozzies still under the jackboot of the crown, well, that's another story for another day.

Either way, thanks for helping me make my Snipping Tool as optimal as possible with its maximal window.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    MSFT Surface Pro 8
    CPU
    11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GH
    Memory
    16GB
SnippingMax.bat
Batch:
@ECHO OFF
FOR /F "tokens=* USEBACKQ" %%F IN (`REG QUERY "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" /v InstallPath`) DO SET InstallPath=%%F
SET InstallPath=%InstallPath:*REG_SZ =%
FOR /F "tokens=* Eol= " %%F IN ("%InstallPath%") DO SET "InstallPath=%%F"
IF EXIST "%InstallPath%csc.exe" (ECHO ON) ELSE (ECHO ERROR - Missing csc.exe & GOTO end)
"%InstallPath%csc.exe" /out:"%~dp0\SnippingMax.exe" /target:winexe "%~dp0\SnippingMax.cs" /lib:%InstallPath%WPF /r:UIAutomationTypes.dll,UIAutomationClient.dll
:end
@ECHO Press any key to close this command window . . . & PAUSE >NUL

SnippingMax.cs
Code:
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Threading;
using System.Windows.Automation;

class SnippingMax
{
  [DllImport("user32.dll")]
  static extern public bool ShowWindowAsync(IntPtr hWnd, int nCmdShow);

  [DllImport("user32.dll")]
  [return: MarshalAs(UnmanagedType.Bool)]
  static extern bool GetWindowRect(HandleRef hWnd, out RECT lpRect);

  [StructLayout(LayoutKind.Sequential)]
  public struct RECT
  {
    public int Left;
    public int Top;
    public int Right;
    public int Bottom;
  }

  private static void OnWindowOpened(object src, AutomationEventArgs e)
  {
    try
    {
      var elem = src as AutomationElement;
      Process proc = Process.GetProcessById(elem.Current.ProcessId);
      if (elem != null && proc.ProcessName == "SnippingTool")
      {
        WindowPattern windowPattern = null;
        windowPattern = elem.GetCurrentPattern(WindowPattern.Pattern) as WindowPattern;
        if (windowPattern.WaitForInputIdle(4000))
        {
          RECT r1;
          if (GetWindowRect(new HandleRef(new Object(), proc.MainWindowHandle), out r1))
          {              
            Thread.Sleep(1000);
            RECT r2 = r1;
            for (int i=10; (i>0) && (r2.Left == r1.Left) && (r2.Top == r1.Top) && (r2.Right == r1.Right) && (r2.Bottom == r1.Bottom); i--)
            {
              if (GetWindowRect(new HandleRef(new Object(), proc.MainWindowHandle), out r2))
              {
                Thread.Sleep(100);
              }
            }
          }
          ShowWindowAsync(proc.MainWindowHandle, 3);
        }
      }
    }
    catch (Exception) {}
    Process.GetCurrentProcess().Kill();
  }

  static void Main(string[] args)
  {
    System.Windows.Automation.Automation.AddAutomationEventHandler(
        WindowPattern.WindowOpenedEvent,
        AutomationElement.RootElement,
        TreeScope.Children,
        OnWindowOpened);
    Process.Start("explorer.exe", "ms-screenclip:");
    Thread.Sleep(Timeout.Infinite);
  }
}
  1. Run SnippingMax.bat to build SnippingMax.exe
  2. Run SnippingMax.exe to start Snipping Tool so it will be maximized within 100 milliseconds after the screenshot opens in it.
 

My Computers

System One System Two

  • OS
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Asus TUF Gaming (2024)
    CPU
    i7 13650HX
    Memory
    16GB DDR5
    Graphics Card(s)
    GeForce RTX 4060 Mobile
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    512GB SSD internal
    37TB external
    PSU
    Li-ion
    Cooling
    2× Arc Flow Fans, 4× exhaust vents, 5× heatpipes
    Keyboard
    Logitech K800
    Mouse
    Logitech G402
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
  • Operating System
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Medion S15450
    CPU
    i5 1135G7
    Memory
    16GB DDR4
    Graphics card(s)
    Intel Iris Xe
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    2TB SSD internal
    37TB external
    PSU
    Li-ion
    Mouse
    Logitech G402
    Keyboard
    Logitech K800
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
Holy mackerel!

Will that also work if I right-click on a JPG and select "Open With -> Snipping Tool"?
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    MSFT Surface Pro 8
    CPU
    11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GH
    Memory
    16GB

My Computers

System One System Two

  • OS
    Windows 11 Pro 23H2 Build: 22631.3374
    Computer type
    PC/Desktop
    Manufacturer/Model
    Sin-built
    CPU
    Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz (4th Gen?)
    Motherboard
    ASUS ROG Maximus VI Formula
    Memory
    32.0 GB of I forget and the box is in storage.
    Graphics Card(s)
    Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    Sound Card
    Onboard
    Monitor(s) Displays
    4 x LG 23MP75 1 x 24" LG M38H 1 x 32" LF6300 TV Monitor 1 x Wacom Pro 22" Tablet
    Screen Resolution
    All over the place
    Hard Drives
    2 x WD something Something 8TB HDD's / 2 x WD something Something 4TB HDD's / 1 x EVO 1TB SSD / 2 x QVO 1TB SSD's / 1 x EVO 250 GB SSD / 2 x QVO 1TB (External Hub) / 1 x EVO 1TB (Portable Backup Case)
    PSU
    Silverstone 1500
    Case
    NZXT Full Tower
    Cooling
    Noctua NH-D15 Elite Class Dual Tower CPU Cooler / 6 x EziDIY 120mm / 2 x Corsair 140mm somethings / 1 x 140mm Thermaltake something / 2 x 200mm Corsair.
    Keyboard
    Corsair K95 / Logitech diNovo Edge Wireless
    Mouse
    Logitech G402 / G502 / Mx Masters / MX Air Cordless
    Internet Speed
    100/40Mbps
    Browser
    All sorts
    Antivirus
    Kaspersky Premium
    Other Info
    I’m on a horse.
  • Operating System
    Windows 11 Pro 22621.2215
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO Yoga 7i EVO OLED 14" Touchscreen i5 12 Core 16GB/512GB
    CPU
    Intel Core 12th Gen i5-1240P Processor (1.7 - 4.4GHz)
    Memory
    16GB LPDDR5 RAM
    Graphics card(s)
    Graphics processor is an Intel Iris Xe
    Sound Card
    optimized with Dolby Atmos®
    Screen Resolution
    QHD 2880 x 1800 OLED
    Hard Drives
    M.2 512GB
    Other Info
    …still on a horse.
Holy mackerel!

Will that also work if I right-click on a JPG and select "Open With -> Snipping Tool"?
No, it just lets you make your screenshot, same as pressing Win+Shift+S, but the Snipping Tool window will be maximized after.
 

My Computers

System One System Two

  • OS
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Asus TUF Gaming (2024)
    CPU
    i7 13650HX
    Memory
    16GB DDR5
    Graphics Card(s)
    GeForce RTX 4060 Mobile
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    512GB SSD internal
    37TB external
    PSU
    Li-ion
    Cooling
    2× Arc Flow Fans, 4× exhaust vents, 5× heatpipes
    Keyboard
    Logitech K800
    Mouse
    Logitech G402
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
  • Operating System
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Medion S15450
    CPU
    i5 1135G7
    Memory
    16GB DDR4
    Graphics card(s)
    Intel Iris Xe
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    2TB SSD internal
    37TB external
    PSU
    Li-ion
    Mouse
    Logitech G402
    Keyboard
    Logitech K800
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
Holy mackerel!

Will that also work if I right-click on a JPG and select "Open With -> Snipping Tool"?
You’d probably have to add that to your context menu via regedit? That’s an @Edwin specialty.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 23H2 Build: 22631.3374
    Computer type
    PC/Desktop
    Manufacturer/Model
    Sin-built
    CPU
    Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz (4th Gen?)
    Motherboard
    ASUS ROG Maximus VI Formula
    Memory
    32.0 GB of I forget and the box is in storage.
    Graphics Card(s)
    Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    Sound Card
    Onboard
    Monitor(s) Displays
    4 x LG 23MP75 1 x 24" LG M38H 1 x 32" LF6300 TV Monitor 1 x Wacom Pro 22" Tablet
    Screen Resolution
    All over the place
    Hard Drives
    2 x WD something Something 8TB HDD's / 2 x WD something Something 4TB HDD's / 1 x EVO 1TB SSD / 2 x QVO 1TB SSD's / 1 x EVO 250 GB SSD / 2 x QVO 1TB (External Hub) / 1 x EVO 1TB (Portable Backup Case)
    PSU
    Silverstone 1500
    Case
    NZXT Full Tower
    Cooling
    Noctua NH-D15 Elite Class Dual Tower CPU Cooler / 6 x EziDIY 120mm / 2 x Corsair 140mm somethings / 1 x 140mm Thermaltake something / 2 x 200mm Corsair.
    Keyboard
    Corsair K95 / Logitech diNovo Edge Wireless
    Mouse
    Logitech G402 / G502 / Mx Masters / MX Air Cordless
    Internet Speed
    100/40Mbps
    Browser
    All sorts
    Antivirus
    Kaspersky Premium
    Other Info
    I’m on a horse.
  • Operating System
    Windows 11 Pro 22621.2215
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO Yoga 7i EVO OLED 14" Touchscreen i5 12 Core 16GB/512GB
    CPU
    Intel Core 12th Gen i5-1240P Processor (1.7 - 4.4GHz)
    Memory
    16GB LPDDR5 RAM
    Graphics card(s)
    Graphics processor is an Intel Iris Xe
    Sound Card
    optimized with Dolby Atmos®
    Screen Resolution
    QHD 2880 x 1800 OLED
    Hard Drives
    M.2 512GB
    Other Info
    …still on a horse.

Latest Support Threads

Back
Top Bottom