I tried the following C # code, but when taking a snapshot, also part of the opened part in the image Is the file menu I need some help to capture the screen after the click event and before clicking the save button, but should not be part of the opened file menu in it
Private Zero viewviewsstrip menuItmclClique (Object sender, eventarges e) {string filename = ""; Bitmap screen = new bitmap (network_drawing_panel.Wide, Network_drawing_panel.html -50); Use (graphics g = graphics. Framesize (screen)) {g.CopyFromScreen (0, 80, 0, 0, screen size); } // SaveFileDialog SaveFileDialog dlg = new SaveFileDialog (); Dlg.InitialDirectory = @ "C: \\ Picture"; Dlg.DefaultExt = ".jpg"; Dlg.Filter = "JPEG Images (.jpg) | * .jpg | All Files (*. *) | *. *"; Dlg.Title = "Save an Image File"; If (dlg.ShowDialog () == DialogResult.OK) {filename = dlg.FileName; {Try the screen. Save (File Name, System. Drawing Imaging. Format .jpg); } Catch (Exception C) {Console.WriteLine (c.ToString ()); }}} This is my snap shot.
The basic way to do this is to use postmessage, before the operation is complete, the current dispatch is completely Completion is allowed.
PostMessage is equivalent to WinForms (a form is a control). WinForms uses PostMost to actually perform delegates from PostInfo.
Comments
Post a Comment