try:
Dim b As Bitmap = New Bitmap(My.Computer.Screen.Bounds.Width, My.Computer.Screen.Bounds.Height, Imaging.PixelFormat.Format32bppArgb)
Dim gfx As Graphics = Graphics.FromImage(b)
gfx.CopyFromScreen(0, 0, 0, 0, Screen.PrimaryScreen.Bounds.Size, CopyPixelOperation.SourceCopy)
path = "C:\Documents and Settings\Nano\My Documents\My Pictures\my2.jpg"
b.Save(path, Imaging.ImageFormat.Jpeg)
The code you posted has saved the image in the same folder as your applications executable.
Edited: Or, use this function from the web (just provide the path name):
Function ScreenToPicture(ByVal Location As String) As String
Try
Dim currentScreenSize As Size = New Size(My.Computer.Screen.Bounds.Width, My.Computer.Screen.Bounds.Height)
Dim ScreenToBitmap As New Bitmap(My.Computer.Screen.Bounds.Width, My.Computer.Screen.Bounds.Height)
Dim gGraphics As System.Drawing.Graphics = System.Drawing.Graphics.FromImage(ScreenToBitmap)
gGraphics.CopyFromScreen(New Point(0, 0), New Point(0, 0), currentScreenSize)
ScreenToBitmap.Save(Location)
Return Location
Catch ex As Exception
Return ex.Message
End Try
End Function