"景先生毕设|www.jxszl.com

C# CaptureType类代码示例

2023-12-29 17:39编辑: www.jxszl.com景先生毕设
本文整理汇总了C#中CaptureType类的典型用法代码示例。如果您正苦于以下问题:C#CaptureType类的具体用法?C#CaptureType怎么用?C#CaptureType使用的例子?这里精选的类代码示例或许可以为您提供帮助。 示例1:Capture publicoverridevoidCapture(CaptureTypecaptureType,TaskSettingstaskSettings,boolautoHideForm=true) { DoCapture(()=> { Imageimg; stringactiveWindowTitle=NativeMethods.GetForegroundWindowText(); stringactiveProcessName=null; using(Processprocess=NativeMethods.GetForegroundWindowProcess()) { if(process!=null) { activeProcessName=process.ProcessName; } } if(taskSettings.CaptureSettings.CaptureTransparent&&!taskSettings.CaptureSettings.CaptureClientArea) { img=Screenshot.CaptureActiveWindowTransparent(); } else { img=Screenshot.CaptureActiveWindow(); } img.Tag=newImageTag { ActiveWindowTitle=activeWindowTitle, ActiveProcessName=activeProcessName }; returnimg; },CaptureType.ActiveWindow,taskSettings,autoHideForm); }
原文链接:http://www.jxszl.com/biancheng/C/556671.html