Systemdaten und Screenshot in Temp-Ordner
This commit is contained in:
@@ -547,11 +547,11 @@ Public Class cProgramFunctions
|
|||||||
graph = Graphics.FromImage(screenshot)
|
graph = Graphics.FromImage(screenshot)
|
||||||
graph.CopyFromScreen(bounds.X, bounds.Y, 0, 0, bounds.Size, CopyPixelOperation.SourceCopy)
|
graph.CopyFromScreen(bounds.X, bounds.Y, 0, 0, bounds.Size, CopyPixelOperation.SourceCopy)
|
||||||
' PictureBox1.Image = screenshot
|
' PictureBox1.Image = screenshot
|
||||||
If Not My.Computer.FileSystem.DirectoryExists(My.Computer.FileSystem.SpecialDirectories.Desktop & "\Screenshots_" & My.Application.Info.AssemblyName & "\") Then
|
If Not My.Computer.FileSystem.DirectoryExists(My.Computer.FileSystem.SpecialDirectories.Temp & "\Screenshots_" & My.Application.Info.AssemblyName & "\") Then
|
||||||
My.Computer.FileSystem.CreateDirectory(My.Computer.FileSystem.SpecialDirectories.Desktop & "\Screenshots_" & My.Application.Info.AssemblyName & "\")
|
My.Computer.FileSystem.CreateDirectory(My.Computer.FileSystem.SpecialDirectories.Temp & "\Screenshots_" & My.Application.Info.AssemblyName & "\")
|
||||||
End If
|
End If
|
||||||
Dim cnt As Integer = 1
|
Dim cnt As Integer = 1
|
||||||
Dim strname As String = My.Computer.FileSystem.SpecialDirectories.Desktop & "\Screenshots_" & My.Application.Info.AssemblyName & "\" & form.Name & "_" & Now.ToString("ddMMyyyy_HHmm_")
|
Dim strname As String = My.Computer.FileSystem.SpecialDirectories.Temp & "\Screenshots_" & My.Application.Info.AssemblyName & "\" & form.Name & "_" & Now.ToString("ddMMyyyy_HHmm_")
|
||||||
While System.IO.File.Exists(strname & cnt & ".bmp") : cnt += 1 : End While
|
While System.IO.File.Exists(strname & cnt & ".bmp") : cnt += 1 : End While
|
||||||
screenshot.Save(strname & cnt & ".bmp")
|
screenshot.Save(strname & cnt & ".bmp")
|
||||||
Return strname & cnt & ".bmp"
|
Return strname & cnt & ".bmp"
|
||||||
|
|||||||
@@ -83,12 +83,12 @@ Public Class frmErrorMeldung
|
|||||||
If cbxEnviromentVariables.Checked Then
|
If cbxEnviromentVariables.Checked Then
|
||||||
|
|
||||||
|
|
||||||
If Not My.Computer.FileSystem.DirectoryExists(My.Computer.FileSystem.SpecialDirectories.Desktop & "\Screenshots_" & My.Application.Info.AssemblyName & "\") Then
|
If Not My.Computer.FileSystem.DirectoryExists(My.Computer.FileSystem.SpecialDirectories.Temp & "\Screenshots_" & My.Application.Info.AssemblyName & "\") Then
|
||||||
My.Computer.FileSystem.CreateDirectory(My.Computer.FileSystem.SpecialDirectories.Desktop & "\Screenshots_" & My.Application.Info.AssemblyName & "\")
|
My.Computer.FileSystem.CreateDirectory(My.Computer.FileSystem.SpecialDirectories.Temp & "\Screenshots_" & My.Application.Info.AssemblyName & "\")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim filename = "SystemEnviroment_" & Now.ToFileTime & "_.txt"
|
Dim filename = "SystemEnviroment_" & Now.ToFileTime & "_.txt"
|
||||||
Dim strFile As String = My.Computer.FileSystem.SpecialDirectories.Desktop & "\Screenshots_" & My.Application.Info.AssemblyName & "\" & filename
|
Dim strFile As String = My.Computer.FileSystem.SpecialDirectories.Temp & "\Screenshots_" & My.Application.Info.AssemblyName & "\" & filename
|
||||||
Dim fileExists As Boolean = File.Exists(strFile)
|
Dim fileExists As Boolean = File.Exists(strFile)
|
||||||
Using sw As New StreamWriter(File.Open(strFile, FileMode.CreateNew))
|
Using sw As New StreamWriter(File.Open(strFile, FileMode.CreateNew))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user