Loại: Class
Ngôn ngữ lập trình: VB.NET
Tác giả: Arman Ghazanchyan
Chức năng: Chụp màn hình với nhiều kiểu hỗ trợ: chụp desktop, active windows, control, vùng tùy ý... ăn đứt tính năng có sẵn của VB.NET
Class shared methods:
- FullScreen - Chụp toàn màn hình
- DisplayMonitor- Chụp màn hình hiển thị.
- ActiveWindow – Chụp cửa sổ.
- Window– Chụp Windows dựa trên handle hoặc point (overloaded).
- Control– Chụp Control dựa trên handle or point (overloaded).
- ScreenRectangle– Chụp một vùng chữ nhật tùy ý.
Đặc biệt, ảnh chụp bao gồm luôn cả con chuột
Sử dụng:
Using vbnet Syntax Highlighting
Private Sub ControlButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ControlButton.Click
Try
'Capture the image of this button including the cursor.
Dim img As Image = SCapture.Control(Control.MousePosition, True)
'Save the captured image.
img.Save(filePath, Drawing.Imaging.ImageFormat.Png)
'Also display the captured image in a PictureBox.
Me.DisplayPictureBox.BackgroundImage = img
Catch ex As Exception
'Show a MessageBox if the capture of image failed.
MessageBox.Show("Failed to capture the control!" _
& Environment.NewLine & ex.Message, "Capture Error!", _
MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
Try
'Capture the image of this button including the cursor.
Dim img As Image = SCapture.Control(Control.MousePosition, True)
'Save the captured image.
img.Save(filePath, Drawing.Imaging.ImageFormat.Png)
'Also display the captured image in a PictureBox.
Me.DisplayPictureBox.BackgroundImage = img
Catch ex As Exception
'Show a MessageBox if the capture of image failed.
MessageBox.Show("Failed to capture the control!" _
& Environment.NewLine & ex.Message, "Capture Error!", _
MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
Parsed in 0.017 seconds, using GeSHi 1.0.8.4
So sánh Class này với tính năng có sẵn:
Phần hấp dẫn nhất: Download:


