Не сте регистриран! Регистрирайте се БЕЗПЛАТНО, за да използвате услугите на сайта!

 Скрийншот чрез .NET
Автор  mara (07.11.2004 19:16) съобщение до автора
Погледнат  1346 пъти добави към любими
Оценка добави коментар
Гласове  3 изпрати на приятел
Коментари  (0) абонирай се за C-Cplusplus
     
mara
     
 

CODE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Public Class Form1

Private Sub btnCopy_Click
(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCopy.Click

'create the bitmap and graphics objects
Dim b As Bitmap = New Bitmap(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height)
Dim g As Graphics = Graphics.FromImage(b)

Dim s As Size = New Sizе(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height)

'copy the image form the screen. You can customize the size
'and postions to take the screenshot from
g.CopyFromScreen(0, 0, 0, 0, s, CopyPixelOperation.SourceCopy)

'load the copied image to the picturebox control
pic
.Image = b

'clean up alittle
g.Dispose()
b = Nothing

End Sub
Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click

'dim new saveDialog and dialogResult objects
Dim saveDlg As SaveFileDialog
= New SaveFileDialog
Dim
dlgResult As DialogResult = New DialogResult

'set the filter to JPEG files only
saveDlg.Filter = "JPEG Files (*.jpg)|*.jpg"
saveDlg.Title = "Determine the file to save the image too"

dlgResult = saveDlg.ShowDialog

If dlgResult = Windows.Forms.DialogResult.OK Then

'save the image contained in the picturebox
pic
.Image.Save(saveDlg.FileName)

End If

End Sub

End Class



Ключови думи: c C++ c# software софтуер screenshot cкрийншот class




 1 посетител чете този скрипт (0 потребители и 1 гост)  
Активни потребители: ---
   
  

Еmail  
 

 

 
  • Интересно от Софтуер
 
  • Интересно от myLINKS
 
 
 
 



IT-PLACE.NET © 2004 - 2008