Screen & Region Capture
Core API Hook: Graphics.CopyFromScreen (System.Drawing)
Instantly capture full monitors, active app borders, or custom screen regions straight into the clipboard or auto-saved directories.
Configuration Parameters
| Parameter | Type | Description |
|---|---|---|
| Target | string | Output location mode: 'Clipboard' or an absolute target directory path to write the image file. |
| Format | string | Target image encoding layout format: 'PNG', 'JPEG', 'BMP', or 'GIF'. |
config.json Mapping
{
"Type": "ScreenShot",
"Name": "Capture Active Window",
"Target": "C:\\Screenshots",
"Format": "PNG"
}
Save inside database layout actions configuration map.
Native Execution Hook
// ScreenShot execution logic
var rect = Win32.GetActiveWindowRect();
using (var bmp = new Bitmap(rect.Width, rect.Height))
{
using (var g = Graphics.FromImage(bmp))
{
g.CopyFromScreen(rect.Left, rect.Top, 0, 0, rect.Size);
}
if (action.Target == "Clipboard") {
Clipboard.SetImage(bmp);
} else {
var path = Path.Combine(action.Target, $"Cap_{DateTime.Now:yyyyMMdd_HHmmss}.png");
bmp.Save(path, ImageFormat.Png);
}
}
Executed within IsoCore remapping runtime loop.
← Back to Actions Directory
IsoKey Module: ScreenShot