logo logo

The next-generation blog, news, and magazine theme for you to start sharing your stories today!

The Blogzine

Save on Premium Membership

Get the insights report trusted by experts around the globe. Become a Member Today!

View pricing plans

New York, USA (HQ)

750 Sing Sing Rd, Horseheads, NY, 14845

Call: 469-537-2410 (Toll-free)

hello@blogzine.com
.Net

Visual Basic - Screen Capturing Program Tutorial - VB.net

Đây là ứng dụng do mình phát triển nhé các bạn ^^. Cũng vì rảnh quá nên ngồi máy mò code ai ngờ lại viết được ra ứng dụng này ^^ code hoàn toàn đơn giản các bạn nhé ^^! Mình xin chia sẽ source luôn c…

avatar
Hung.Pro.VN

Developer Windows


  • 20/09/2016
  • Views

Đây là ứng dụng do mình phát triển nhé các bạn ^^. Cũng vì rảnh quá nên ngồi máy mò code ai ngờ lại viết được ra ứng dụng này ^^ code hoàn toàn đơn giản các bạn nhé ^^! Mình xin chia sẽ source luôn cho bạn nào cần nhé :D.

Public Class Form1
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
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
Timer1.Enabled = False
Me.Opacity = 100
End Sub

Private Sub ToolStripStatusLabel1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripStatusLabel1.Click
Me.Opacity = 0
Timer1.Enabled = True
End Sub

Private Sub ToolStripStatusLabel2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripStatusLabel2.Click
Dim savefiledialog1 As New SaveFileDialog
Try
savefiledialog1.Title = "Save File"
savefiledialog1.FileName = "Save As..."
savefiledialog1.Filter = "JPEG |*.jpeg"
If savefiledialog1.ShowDialog() = DialogResult.OK Then PictureBox1.Image.Save(savefiledialog1.FileName, System.Drawing.Imaging.ImageFormat.Bmp)
Catch ex As Exception
'Do Nothing
End Try
End Sub
End Class

Còn dưới dây là video mình test nhé :)


Link Download App


Anh em nào muốn lấy source thì để lại email mình send cho nhé :)

Related post


avatar

Hung.Pro.VN

Nhà thiết kế Web
View Articles

Tôi là admin trang Hung.Pro.VN là một người có đam mê với Blogspot, kinh nghiệm 5 năm thiết kế ra hàng trăm mẫu Template blogpsot như" Bán hàng, bất động sản, landing page, tin tức...

Nhận xét

Share this article