-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPropertiesDotNet.vb
427 lines (415 loc) · 23.1 KB
/
PropertiesDotNet.vb
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
Imports System.IO
Imports System.IO.File
Public Class PropertiesDotNet
''' <summary>
''' Imported Functions: FindExecutable:
''' Used for finding the program that a file opens with
''' http://www.vb-helper.com/howto_get_associated_program.html
''' </summary>
Private Declare Function FindExecutable Lib "shell32.dll" Alias "FindExecutableA"(lpFile As String, lpDirectory As String, lpResult As String) As Long
Sub PropertiesDotNet_Load(sender As Object, e As EventArgs) Handles Me.Load
For Each s As String In My.Application.CommandLineArgs
If lblLocation.Text = "Checking..." Then
lblLocation.Text = s
Else
Process.Start(Application.StartupPath & "\" & Process.GetCurrentProcess.ProcessName & ".exe", """" & s & """")
End If
Next
If lblLocation.Text = "Checking..." Then
Dim OpenFileDialog As New OpenFileDialog()
OpenFileDialog.Filter = "All Files|*.*"
OpenFileDialog.Title = "Select a file to view properties for:"
If OpenFileDialog.ShowDialog() = DialogResult.OK Then
lblLocation.Text = OpenFileDialog.FileName
Else
Application.Exit
End If
End If
CheckData
End Sub
Sub CheckData Handles chkUTC.CheckedChanged
'Properties:
Dim FileProperties As New FileInfo(lblLocation.Text)
Me.Text = "Properties: " & FileProperties.Name
lblFullPath.Text = FileProperties.FullName
lblDirectory.Text = FileProperties.DirectoryName
lblName.Text = FileProperties.Name
If lblName.Width>62 Then Me.Width = lblName.Width + 370
lblExtension.Text = FileProperties.Extension
lblSize.Text = FileProperties.Length
imgFile.ImageLocation = FileProperties.FullName
Dim result As String = Space$(1024)
FindExecutable(lblName.Text, lblDirectory.Text & "\", result)
lblOpenWith.Text = Strings.Left$(result, InStr(result, Chr(0)) - 1)
If lblOpenWith.Text = "" Then lblOpenWith.Text = "Filetype not associated!"
If chkUTC.Checked Then
lblCreationTime.Text = GetCreationTime(lblLocation.Text)
lblLastAccessTime.Text = GetLastAccessTime(lblLocation.Text)
lblLastWriteTime.Text = GetLastWriteTime(lblLocation.Text)
Else
lblCreationTime.Text = GetCreationTimeUtc(lblLocation.Text)
lblLastAccessTime.Text = GetLastAccessTimeUtc(lblLocation.Text)
lblLastWriteTime.Text = GetLastWriteTimeUtc(lblLocation.Text)
End If
'Attributes:
chkReadOnly.Checked = GetAttributes(lblLocation.Text).HasFlag(FileAttributes.ReadOnly)
chkHidden.Checked = GetAttributes(lblLocation.Text).HasFlag(FileAttributes.Hidden)
chkCompressed.Checked = GetAttributes(lblLocation.Text).HasFlag(FileAttributes.Compressed)
chkEncrypted.Checked = GetAttributes(lblLocation.Text).HasFlag(FileAttributes.Encrypted)
chkSystem.Checked = GetAttributes(lblLocation.Text).HasFlag(FileAttributes.System)
chkArchive.Checked = GetAttributes(lblLocation.Text).HasFlag(FileAttributes.Archive)
chkTemporary.Checked = GetAttributes(lblLocation.Text).HasFlag(FileAttributes.Temporary)
chkIntegrity.Checked = GetAttributes(lblLocation.Text).HasFlag(FileAttributes.IntegrityStream)
chkNoScrub.Checked = GetAttributes(lblLocation.Text).HasFlag(FileAttributes.NoScrubData)
chkNotIndexed.Checked = GetAttributes(lblLocation.Text).HasFlag(FileAttributes.NotContentIndexed)
chkOffline.Checked = GetAttributes(lblLocation.Text).HasFlag(FileAttributes.Offline)
chkReparse.Checked = GetAttributes(lblLocation.Text).HasFlag(FileAttributes.ReparsePoint)
chkSparse.Checked = GetAttributes(lblLocation.Text).HasFlag(FileAttributes.SparseFile)
End Sub
Sub btnCopyFullPath_Click() Handles btnCopyFullPath.Click
Try
Clipboard.SetText(lblFullPath.Text, TextDataFormat.UnicodeText)
MsgBox(lblFullPath.Text & vbNewLine & "Succesfully copied!", MsgBoxStyle.Information, "Succesfully copied!")
Catch ex As Exception
MsgBox("Copy failed!" & vbNewLine & "Error: """ & ex.ToString & """", MsgBoxStyle.Critical, "Copy failed!")
End Try
End Sub
Sub btnCopyDirectory_Click() Handles btnCopyDirectory.Click
Try
Clipboard.SetText(lblDirectory.Text, TextDataFormat.UnicodeText)
MsgBox(lblDirectory.Text & vbNewLine & "Succesfully copied!", MsgBoxStyle.Information, "Succesfully copied!")
Catch ex As Exception
MsgBox("Copy failed!" & vbNewLine & "Error: """ & ex.ToString & """", MsgBoxStyle.Critical, "Copy failed!")
End Try
End Sub
Sub btnCopyName_Click() Handles btnCopyName.Click
Try
Clipboard.SetText(lblName.Text, TextDataFormat.UnicodeText)
MsgBox(lblName.Text & vbNewLine & "Succesfully copied!", MsgBoxStyle.Information, "Succesfully copied!")
Catch ex As Exception
MsgBox("Copy failed!" & vbNewLine & "Error: """ & ex.ToString & """", MsgBoxStyle.Critical, "Copy failed!")
End Try
End Sub
Sub btnCopyExtension_Click() Handles btnCopyExtension.Click
Try
Clipboard.SetText(lblExtension.Text, TextDataFormat.UnicodeText)
MsgBox(lblExtension.Text & vbNewLine & "Succesfully copied!", MsgBoxStyle.Information, "Succesfully copied!")
Catch ex As Exception
MsgBox("Copy failed!" & vbNewLine & "Error: """ & ex.ToString & """", MsgBoxStyle.Critical, "Copy failed!")
End Try
End Sub
Sub btnCopyOpenWith_Click() Handles btnCopyOpenWith.Click
Try
Clipboard.SetText(lblOpenWith.Text, TextDataFormat.UnicodeText)
MsgBox(lblOpenWith.Text & vbNewLine & "Succesfully copied!", MsgBoxStyle.Information, "Succesfully copied!")
Catch ex As Exception
MsgBox("Copy failed!" & vbNewLine & "Error: """ & ex.ToString & """", MsgBoxStyle.Critical, "Copy failed!")
End Try
End Sub
Sub btnOpenDir_Click() Handles btnOpenDir.Click
Process.Start(lblDirectory.Text)
End Sub
Sub btnLaunch_Click() Handles btnLaunch.Click
Process.Start(lblFullPath.Text)
End Sub
Sub btnOpenWith_Click() Handles btnOpenWith.Click
Dim isDangerousExtension As New Boolean
Dim dangerousExtensions() As String = {".exe", ".bat", ".cmd", ".lnk", ".com", ".scr"}
For i = 1 To dangerousExtensions.Length
If lblExtension.Text = dangerousExtensions(i-1) Then
isDangerousExtension = True
Exit For
End If
Next
If isDangerousExtension Then
If MsgBox("Are you sure you want to open the ""Open With"" dialog for """ & lblExtension.Text & _
""" files? this could potentially make your PC unusable if you click ""Ok"" in it while the ""Always use the selected program"" checkbox is checked!", _
MsgBoxStyle.Critical + MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then _
If MsgBox("You have been warned!", MsgBoxStyle.Exclamation + MsgBoxStyle.OkCancel) = MsgBoxResult.Ok Then _
Shell("rundll32 shell32.dll,OpenAs_RunDLL " & lblFullPath.Text, AppWinStyle.NormalFocus, True, 500)
Else
Shell("rundll32 shell32.dll,OpenAs_RunDLL " & lblFullPath.Text, AppWinStyle.NormalFocus, True, 500)
'Process.Start("rundll32", "shell32.dll,OpenAs_RunDLL " & lblFullPath.Text)
End If
End Sub
Sub btnStartAssocProg_Click() Handles btnStartAssocProg.Click
Process.Start(lblOpenWith.Text)
End Sub
Sub btnHashes_Click() Handles btnHashes.Click
Hashes.Show
End Sub
Sub chkReadOnly_Click() Handles chkReadOnly.Click
If chkReadOnly.Checked Then SetAttribWCheck(lblLocation.Text, GetAttributes(lblLocation.Text) + FileAttributes.ReadOnly) _
Else SetAttribWCheck(lblLocation.Text, GetAttributes(lblLocation.Text) - FileAttributes.ReadOnly)
CheckData
End Sub
Sub chkHidden_Click() Handles chkHidden.Click
If chkHidden.Checked Then SetAttribWCheck(lblLocation.Text, GetAttributes(lblLocation.Text) + FileAttributes.Hidden) _
Else SetAttribWCheck(lblLocation.Text, GetAttributes(lblLocation.Text) - FileAttributes.Hidden)
CheckData
End Sub
Sub chkCompressed_Click() Handles chkCompressed.Click
If chkCompressed.Checked Then
If SetAttribWCheck(lblLocation.Text, GetAttributes(lblLocation.Text) + FileAttributes.Compressed) Then
If Not GetAttributes(lblLocation.Text).HasFlag(FileAttributes.Compressed) Then
CompressReport.Compress(lblFullPath.Text)
CompressReport.ShowDialog
End If
End If
Else
If SetAttribWCheck(lblLocation.Text, GetAttributes(lblLocation.Text) - FileAttributes.Compressed) Then
If GetAttributes(lblLocation.Text).HasFlag(FileAttributes.Compressed) Then
CompressReport.Compress(lblFullPath.Text, False)
CompressReport.ShowDialog
End If
End If
End If
CheckData
End Sub
Sub chkEncrypted_Click() Handles chkEncrypted.Click
If chkEncrypted.Checked Then
If SetAttribWCheck(lblLocation.Text, GetAttributes(lblLocation.Text) + FileAttributes.Encrypted) Then
If Not GetAttributes(lblLocation.Text).HasFlag(FileAttributes.Encrypted) Then
Dim FileProperties As New FileInfo(lblLocation.Text)
Try
FileProperties.Encrypt
Catch ex As IOException
MsgBox("Could not encrypt!" & vbNewLine & vbNewLine & ex.Message, MsgBoxStyle.Exclamation)
End Try
End If
End If
Else
If SetAttribWCheck(lblLocation.Text, GetAttributes(lblLocation.Text) - FileAttributes.Encrypted) Then
If GetAttributes(lblLocation.Text).HasFlag(FileAttributes.Encrypted) Then
Dim FileProperties As New FileInfo(lblLocation.Text)
Try
FileProperties.Decrypt
Catch ex As IOException
MsgBox("Could not decrypt!" & vbNewLine & vbNewLine & ex.Message, MsgBoxStyle.Exclamation)
End Try
End If
End If
End If
CheckData
End Sub
Sub chkSystem_Click() Handles chkSystem.Click
If chkSystem.Checked Then SetAttribWCheck(lblLocation.Text, GetAttributes(lblLocation.Text) + FileAttributes.System) _
Else SetAttribWCheck(lblLocation.Text, GetAttributes(lblLocation.Text) - FileAttributes.System)
CheckData
End Sub
Sub chkArchive_Click() Handles chkArchive.Click
If chkArchive.Checked Then SetAttribWCheck(lblLocation.Text, GetAttributes(lblLocation.Text) + FileAttributes.Archive) _
Else SetAttribWCheck(lblLocation.Text, GetAttributes(lblLocation.Text) - FileAttributes.Archive)
CheckData
End Sub
Sub chkTemporary_Click() Handles chkTemporary.Click
If chkTemporary.Checked Then SetAttribWCheck(lblLocation.Text, GetAttributes(lblLocation.Text) + FileAttributes.Temporary) _
Else SetAttribWCheck(lblLocation.Text, GetAttributes(lblLocation.Text) - FileAttributes.Temporary)
CheckData
End Sub
Sub chkIntegrity_Click() Handles chkIntegrity.Click
If chkIntegrity.Checked Then SetAttribWCheck(lblLocation.Text, GetAttributes(lblLocation.Text) + FileAttributes.IntegrityStream) _
Else SetAttribWCheck(lblLocation.Text, GetAttributes(lblLocation.Text) - FileAttributes.IntegrityStream)
CheckData
End Sub
Sub chkNoScrub_Click() Handles chkNoScrub.Click
If chkNoScrub.Checked Then SetAttribWCheck(lblLocation.Text, GetAttributes(lblLocation.Text) + FileAttributes.NoScrubData) _
Else SetAttribWCheck(lblLocation.Text, GetAttributes(lblLocation.Text) - FileAttributes.NoScrubData)
CheckData
End Sub
Sub chkNotIndexed_Click() Handles chkNotIndexed.Click
If chkNotIndexed.Checked Then SetAttribWCheck(lblLocation.Text, GetAttributes(lblLocation.Text) + FileAttributes.NotContentIndexed) _
Else SetAttribWCheck(lblLocation.Text, GetAttributes(lblLocation.Text) - FileAttributes.NotContentIndexed)
CheckData
End Sub
Sub chkOffline_Click() Handles chkOffline.Click
If chkOffline.Checked Then SetAttribWCheck(lblLocation.Text, GetAttributes(lblLocation.Text) + FileAttributes.Offline) _
Else SetAttribWCheck(lblLocation.Text, GetAttributes(lblLocation.Text) - FileAttributes.Offline)
CheckData
End Sub
Sub chkReparse_Click() Handles chkReparse.Click
If chkReparse.Checked Then SetAttribWCheck(lblLocation.Text, GetAttributes(lblLocation.Text) + FileAttributes.ReparsePoint) _
Else SetAttribWCheck(lblLocation.Text, GetAttributes(lblLocation.Text) - FileAttributes.ReparsePoint)
CheckData
End Sub
Sub chkSparse_Click() Handles chkSparse.Click
If chkSparse.Checked Then SetAttribWCheck(lblLocation.Text, GetAttributes(lblLocation.Text) + FileAttributes.SparseFile) _
Else SetAttribWCheck(lblLocation.Text, GetAttributes(lblLocation.Text) - FileAttributes.SparseFile)
CheckData
End Sub
Sub lnkAttributes_LinkClicked() Handles lnkAttributes.LinkClicked
Try
Process.Start("https://msdn.microsoft.com/en-us/library/system.io.fileattributes(v=vs.110).aspx#memberList")
Catch ex As Exception
If MsgBox("Unable to launch URL, copy to clipboard instead?", MsgBoxStyle.YesNo + MsgBoxStyle.Information) = MsgBoxResult.Yes Then _
Clipboard.SetText("https://msdn.microsoft.com/en-us/library/system.io.fileattributes(v=vs.110).aspx#memberList")
End Try
End Sub
Sub btnRename_Click() Handles btnRename.Click
Dim FileProperties As New FileInfo(lblLocation.Text)
Dim newName = InputBox("Rename to:", "New name", FileProperties.Name)
If newName <> "" Then
Try
FileProperties.MoveTo(FileProperties.DirectoryName & "\" & newName)
lblLocation.Text = FileProperties.FullName
Catch ex As exception
If ex.GetType.ToString = "System.UnauthorizedAccessException" Then
If MsgBox(ex.message & vbnewline & vbnewline & "Try launching a system tool as admin?", _
MsgBoxStyle.YesNo + MsgBoxStyle.Exclamation, "Access denied!") = MsgBoxResult.Yes Then
CreateObject("Shell.Application").ShellExecute("cmd", "/k ren """ & lblFullPath.Text & _
""" """ & newName & """", "", "runas")
If MsgBox("Read new location?", MsgBoxStyle.YesNo + MsgBoxStyle.Question) = MsgBoxResult.Yes Then _
lblLocation.Text = FileProperties.DirectoryName & "\" & newName
Else
ErrorParser(ex)
End If
Else
ErrorParser(ex)
End If
End Try
End If
CheckData
End Sub
Sub btnDelete_Click() Handles btnDelete.Click
Dim FileProperties As New FileInfo(lblLocation.Text)
If MsgBox("Are you sure you want to delete """ & FileProperties.Name & """?", MsgBoxStyle.Exclamation + MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
Try
FileProperties.Delete
Application.Exit
Catch ex As exception
If ex.GetType.ToString = "System.UnauthorizedAccessException" Then
If MsgBox(ex.message & vbnewline & vbnewline & "Try launching a system tool as admin?", _
MsgBoxStyle.YesNo + MsgBoxStyle.Exclamation, "Access denied!") = MsgBoxResult.Yes Then
CreateObject("Shell.Application").ShellExecute("cmd", "/k del """ & lblFullPath.Text & """", "", "runas")
Else
ErrorParser(ex)
End If
Else
ErrorParser(ex)
End If
End Try
End If
CheckData
End Sub
Sub btnCopy_Click() Handles btnCopy.Click
Dim FileProperties As New FileInfo(lblLocation.Text)
SaveFileDialog.InitialDirectory = FileProperties.DirectoryName
SaveFileDialog.FileName = FileProperties.Name
SaveFileDialog.Title = "Choose where to copy """ & FileProperties.Name & """ to:"
If SaveFileDialog.ShowDialog() = DialogResult.OK Then
' No point in adding an access denied check here, since the SaveFileDialog doesn't allow you to select a location that needs admin access
FileProperties.CopyTo(SaveFileDialog.FileName)
If MsgBox("Read new file?", MsgBoxStyle.YesNo + MsgBoxStyle.Question) = MsgBoxResult.Yes Then _
lblLocation.Text = SaveFileDialog.FileName
End If
CheckData
End Sub
Sub btnCopy_MouseUp(sender As Object, e As MouseEventArgs) Handles btnCopy.MouseUp
If e.Button = Windows.Forms.MouseButtons.Right Then
Dim FileProperties As New FileInfo(lblLocation.Text)
Dim newName = InputBox("Copy to:", "Copy file", FileProperties.FullName)
If newName <> "" Then
Try
FileProperties.CopyTo(newName)
If MsgBox("Read new file?", MsgBoxStyle.YesNo + MsgBoxStyle.Question) = MsgBoxResult.Yes Then _
lblLocation.Text = newName
Catch ex As exception
If ex.GetType.ToString = "System.UnauthorizedAccessException" Then
If MsgBox(ex.message & vbnewline & vbnewline & "Try launching a system tool as admin?", _
MsgBoxStyle.YesNo + MsgBoxStyle.Exclamation, "Access denied!") = MsgBoxResult.Yes Then
CreateObject("Shell.Application").ShellExecute("xcopy", """" & lblFullPath.Text & _
""" """ & newName & """", "", "runas")
If MsgBox("Read new file?", MsgBoxStyle.YesNo + MsgBoxStyle.Question) = MsgBoxResult.Yes Then _
lblLocation.Text = newName
Else
ErrorParser(ex)
End If
Else
ErrorParser(ex)
End If
End Try
End If
CheckData
End If
End Sub
Sub btnMove_Click() Handles btnMove.Click
Dim FileProperties As New FileInfo(lblLocation.Text)
SaveFileDialog.InitialDirectory = FileProperties.DirectoryName
SaveFileDialog.FileName = FileProperties.Name
SaveFileDialog.Title = "Choose where to move """ & FileProperties.Name & """ to:"
If SaveFileDialog.ShowDialog() = DialogResult.OK Then
Try
FileProperties.MoveTo(SaveFileDialog.FileName)
lblLocation.Text = SaveFileDialog.FileName
Catch ex As exception
If ex.GetType.ToString = "System.UnauthorizedAccessException" Then
If MsgBox(ex.message & vbnewline & vbnewline & "Try launching a system tool as admin?", _
MsgBoxStyle.YesNo + MsgBoxStyle.Exclamation, "Access denied!") = MsgBoxResult.Yes Then
CreateObject("Shell.Application").ShellExecute("cmd", "/k move """ & lblFullPath.Text & _
""" """ & SaveFileDialog.FileName & """", "", "runas")
If MsgBox("Read new location?", MsgBoxStyle.YesNo + MsgBoxStyle.Question) = MsgBoxResult.Yes Then _
lblLocation.Text = SaveFileDialog.FileName
Else
ErrorParser(ex)
End If
Else
ErrorParser(ex)
End If
End Try
End If
CheckData
End Sub
Sub btnClose_Click() Handles btnClose.Click
Application.Exit
End Sub
Function SetAttribWCheck(path As String, fileAttributes As FileAttributes)
Try
SetAttributes(path, fileAttributes)
Return True
Catch ex As exception
ErrorParser(ex)
Return False
End Try
End Function
Sub ErrorParser(ex As Exception)
''' <summary>
''' Copied from DirectoryImage (see the end of the file)
''' </summary>
If ex.GetType.ToString = "System.UnauthorizedAccessException" Then
If MsgBox(ex.message & vbnewline & vbnewline & "Try launching PropertiesDotNet As Administrator?", _
MsgBoxStyle.YesNo + MsgBoxStyle.Exclamation, "Access denied!") = MsgBoxResult.Yes Then
CreateObject("Shell.Application").ShellExecute(Application.StartupPath & "\" & _
Process.GetCurrentProcess.ProcessName & ".exe", """" & lblFullPath.Text & """", "", "runas")
Application.Exit
End If
Else
If MsgBox("There was an error! Error message: " & ex.Message & vbNewLine & "Show full stacktrace? (For sending to developer/making bugreport)", _
MsgBoxStyle.YesNo + MsgBoxStyle.Exclamation, "Error!") = MsgBoxresult.Yes Then
Dim frmBugReport As New Form()
frmBugReport.Width = 600
frmBugReport.Height = 525
frmBugReport.StartPosition = FormStartPosition.CenterParent
frmBugReport.WindowState = Me.WindowState
frmBugReport.ShowIcon = False
frmBugReport.ShowInTaskbar = True
frmBugReport.Text = "Full error trace"
Dim txtBugReport As New TextBox()
txtBugReport.Multiline = True
txtBugReport.ScrollBars = ScrollBars.Vertical
frmBugReport.Controls.Add(txtBugReport)
txtBugReport.Dock = DockStyle.Fill
txtBugReport.Text = "ToString:" & vbNewLine & ex.ToString & vbNewLine & vbNewLine & _
"Data:" & vbNewLine & ex.Data.ToString & vbNewLine & vbNewLine & _
"BaseException:" & vbNewLine & ex.GetBaseException.ToString & vbNewLine & vbNewLine & _
"HashCode:" & vbNewLine & ex.GetHashCode.ToString & vbNewLine & vbNewLine & _
"Type:" & vbNewLine & ex.GetType.ToString & vbNewLine & vbNewLine & _
"HResult:" & vbNewLine & ex.HResult.ToString & vbNewLine & vbNewLine & _
"Message:" & vbNewLine & ex.Message.ToString & vbNewLine & vbNewLine & _
"Source:" & vbNewLine & ex.Source.ToString & vbNewLine & vbNewLine & _
"StackTrace:" & vbNewLine & ex.StackTrace.ToString & vbNewLine & vbNewLine & _
"TargetSite:" & vbNewLine & ex.TargetSite.ToString
frmBugReport.Show()
End If
End If
End Sub
End Class