Some code about screenshot

xiaoxiao2021-03-06  100

It is completely lazy code. Usually we want to screen you, press the PRTSC key, then stick to the drawing board.

The following is the simulated code.

private void menuItem1_Click (object sender, System.EventArgs e) {SendKeys.SendWait ( "^ {PRTSC}"); IDataObject iData = Clipboard.GetDataObject (); if (iData == null) return; if (iData.GetDataPresent (DataFormats .Bitmap) {image img = (image) iData.getdata (dataformats.bitmap); graphics g = this.creategraphics (); g.drawimageunscaled (IMG, 0, 0);}}

转载请注明原文地址:https://www.9cbs.com/read-40773.html

New Post(0)