Hello CodeCall
Today i'll show you how to make a ScreenShot Program in Visual Basic
2008 Express Edition ..
That will look like This
All You'll need are :
2 Buttons
1 Picture Box.
Button 1 rename with Take a ScreenShoot ..and
Button 2 rename with Save ..
and the Picture Box Size with a big Area ..
The Code for Button 1(Take a ScreenShot ) is
and for the button 2 ( SAVE ) isCode:Dim bounds As Rectangle Dim screenshot As System.Drawing.Bitmap Dim graph As Graphics bounds = Screen.PrimaryScreen.Bounds screenshot = New System.Drawing.Bitmap(bounds.Width, bounds.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb) graph = Graphics.FromImage(screenshot) graph.CopyFromScreen(bounds.X, bounds.Y, 0, 0, bounds.Size, CopyPixelOperation.SourceCopy) PictureBox1.Image = screenshot
a Screenshot that i made with it ..Code:Dim savefiledialog1 As New SaveFileDialog Try savefiledialog1.Title = "Save File" savefiledialog1.FileName = "*.bmp" savefiledialog1.Filter = "Bitmap |*.bmp" If savefiledialog1.ShowDialog() = DialogResult.OK Then PictureBox1.Image.Save(savefiledialog1.FileName, System.Drawing.Imaging.ImageFormat.Bmp) End If Catch ex As Exception 'Do Nothing End Try
Finally , Test it ..
ScreenShot.rar
Best Wishes ,
Mendim.
Very neat tutorial! +rep
good tutorial mendim, you are doing a nice job with these new tutorials
remind me to +rep you later because i cant now
yo homie i heard you like one-line codes so i put a one line code that evals a decrypted one line code that prints "i love one line codes"
www.amrosama.com | the unholy methods of javascriptCode:eval(base64_decode("cHJpbnQgJ2kgbG92ZSBvbmUtbGluZSBjb2Rlcyc7"));
Nice man, I like it +rep
nice one mendim. .. don't forget to remind me to +rep you when it lets me to![]()
Awesome tutorial. +rep
now i can +rep you .. i think this +rep gonna make you GuRu .. Congrats ..![]()
Thanks a lot EgzON , now i reached the GURU Status with over 200 reputation level .
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks