jpeg - how to save jpg file in My Document/Screentshot in vb.net 2010 -


I created a screen capture tool in vb.net 2010 using the following code:

 
Personal Sub Timer2_Tick (Handle as ByVal e System.EventArgs, as in this System.Object), string as Timer2.Tick slow snappit = 0 TextBox1.Text = = snappit +1 then TextBox1.Text = 0 Then Me.Hide () if finished, TextBox1.Text = -2 again dim screenshot size = New size (My.Computer.Screen.Bounds.Width, My.Computer.Screen.Bounds.Height) New bitmap as dim screengrab Try it (My.Computer.Screen.Bounds. Width, M Y.Computer.Screen.Bounds.Height) System.Drawing.Graphics = System.Drawing.Graphics.FromImage (screengrab) g.CopyFromScreen (New Point (0, 0), New Point (0, 0) , Screenshot) screengrab.Save ("snap.jpg") MSBBC ("Your screen has been closed and snap saved", MSBbox style information, "Screenshots") I Show () Timer 2. (Text) TextBox1.Text = 3 Catch Ex Exception MsgBox ("Sorry to pick up your screen and save this time after unable to try", MsgBoxStyle.Critical, as "Warning ! ") End end then end end

This code store snap.jpg file is in the application path but I want to store it and my document / screenshot

so I want to use

  Dim SnapDir Ring = Maykcomptrkfail system as Menkvisesh Directories. My Documents & amp; "\ Screenshot \"  

and try to transfer that JPG file to snapdir but can not be successful ...

So this is how the JPG file How to save Snapdir or how to save that jpg file by using savefileDialog ...

Thanks

And sorry for the bad english ...

<

  • Announce SnapDir as a spread

  • P>
      String = My.Computer.FileSys as a snapdir Tem.SpecialDirectories.MyDocuments & amp; "\ Screenshot"  
  • "Remove trailing \" from \ "screenshot \" & amp; " .jpg ")" screengrab.Save (SnapDir)

  • took out some of your code, and plugged into a command button

      String = My.Computer.FileSystem.SpecialDirectories.MyDocuments & amp; Try "Screenshots" Dim ScreenShot Size = New Size (My.Computer.Screen.Bounds.Width, My.Computer.Screen.Bounds.Height) Dim ScreenGrab as New Bitmap (My.Computer.Screen .Bounds.Width, My.Computer.Screen.Bounds.Height) System.Drawing.Graphics = System.Drawing.Graphics.FromImage (ScreenGrab) as G.G.CopyFromScreen (New Point (0, 0), New Point (0, 0), screenshot) added to show DR SkeerGraba (snapard and "snap .jpg") 'DRS. Save (snapdair and ".jpg") 'added & amp; ".jpg") Message Box ("Your screen has been closed and the snap is saved", MsgBoxStyle.Information, "Screenshots") me.Show ()  
  • (Screenshot taken with this code found in libraries \ Document)


    Comments