Skip to content

Commit aca47d7

Browse files
committed
fix snippets 5000 errors
1 parent adf8315 commit aca47d7

File tree

12 files changed

+283
-361
lines changed

12 files changed

+283
-361
lines changed

snippets/visualbasic/System.Web.ClientServices/ClientFormsIdentity/Overview/ClientAppServicesDemo.vbproj

Lines changed: 0 additions & 94 deletions
This file was deleted.

snippets/visualbasic/System.Windows.Forms/FileDialog/FileNames/Form1.vb

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
Imports System.Security
1+
Imports System.Drawing
2+
Imports System.Security
3+
Imports System.Windows.Forms
24

35
Public Class Form1
46
Public Shared Sub Main()
@@ -10,7 +12,7 @@ Public Class Form1
1012
End Sub
1113

1214
Private Sub SelectFileButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SelectFileButton.Click
13-
Dim dr As DialogResult = Me.OpenFileDialog1.ShowDialog()
15+
Dim dr As DialogResult = OpenFileDialog1.ShowDialog()
1416
If (dr = System.Windows.Forms.DialogResult.OK) Then
1517
' Read the files
1618
Dim file As String
@@ -25,12 +27,12 @@ Public Class Form1
2527
FlowLayoutPanel1.Controls.Add(pb)
2628
Catch SecEx As SecurityException
2729
' The user lacks appropriate permissions to read files, discover paths, etc.
28-
MessageBox.Show("Security error. Please contact your administrator for details.\n\n" & _
29-
"Error message: " & SecEx.Message & "\n\n" & _
30+
MessageBox.Show("Security error. Please contact your administrator for details.\n\n" &
31+
"Error message: " & SecEx.Message & "\n\n" &
3032
"Details (send to Support):\n\n" & SecEx.StackTrace)
3133
Catch ex As Exception
3234
' Could not load the image - probably permissions-related.
33-
MessageBox.Show(("Cannot display the image: " & file.Substring(file.LastIndexOf("\"c)) & _
35+
MessageBox.Show(("Cannot display the image: " & file.Substring(file.LastIndexOf("\"c)) &
3436
". You may not have permission to read the file, or " + "it may be corrupt." _
3537
& ControlChars.Lf & ControlChars.Lf & "Reported error: " & ex.Message))
3638
End Try
@@ -40,13 +42,13 @@ Public Class Form1
4042

4143
Public Sub InitializeOpenFileDialog()
4244
' Set the file dialog to filter for graphics files.
43-
Me.OpenFileDialog1.Filter = _
44-
"Images (*.BMP;*.JPG;*.GIF)|*.BMP;*.JPG;*.GIF|" + _
45+
OpenFileDialog1.Filter =
46+
"Images (*.BMP;*.JPG;*.GIF)|*.BMP;*.JPG;*.GIF|" +
4547
"All files (*.*)|*.*"
4648

4749
' Allow the user to select multiple images.
48-
Me.OpenFileDialog1.Multiselect = True
49-
Me.OpenFileDialog1.Title = "My Image Browser"
50+
OpenFileDialog1.Multiselect = True
51+
OpenFileDialog1.Title = "My Image Browser"
5052
End Sub
5153
'</SNIPPET1>
5254
End Class

snippets/visualbasic/System.Windows.Forms/FileDialog/SupportMultiDottedExtensions/Form1.vb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
'<SNIPPET1>
22
Imports System.IO
33
Imports System.Text
4+
Imports System.Windows.Forms
45

56
Public Class Form1
67
Public Shared Sub Main()
78
End Sub
8-
9+
910
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
1011
Me.SaveFileDialog1.SupportMultiDottedExtensions = True
1112
Me.SaveFileDialog1.Filter = "Data text files|*.data.txt"

snippets/visualbasic/System.Windows.Forms/HandledMouseEventArgs/Overview/MouseWheelControl.vb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
'<SNIPPET1>
2+
Imports System.Windows.Forms
3+
24
Public Class MouseWheelControl
35
Sub New()
46
' Add initialization code for the control here.
@@ -10,4 +12,4 @@ Public Class MouseWheelControl
1012
' Perform custom mouse wheel action here.
1113
End Sub
1214
End Class
13-
'</SNIPPET1>
15+
'</SNIPPET1>

snippets/visualbasic/System.Windows.Forms/HtmlDocument/Overview/Form1.vb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Imports System.Xml
22
Imports System.Data
33
Imports System.Data.SqlClient
4+
Imports System.Windows.Forms
45

56
Public Class Form1
67
Public Shared Sub Main()

snippets/visualbasic/System.Windows.Forms/HtmlElement/Overview/Form1.vb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Imports System.Net
2+
Imports System.Windows.Forms
23

34
Public Class Form1
45
Public Shared Sub Main()

snippets/visualbasic/System.Windows.Forms/HtmlElementErrorEventArgs/Overview/Form1.vb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
Public Class Form1
1+
Imports System.Windows.Forms
2+
3+
Public Class Form1
24
Public Shared Sub Main()
35
End Sub
46

snippets/visualbasic/System.Windows.Forms/HtmlElementEventArgs/ClientMousePosition/Form1.vb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
Public Class Form1
1+
Imports System.Windows.Forms
2+
3+
Public Class Form1
24
Public Shared Sub Main()
35
End Sub
46

snippets/visualbasic/System.Windows.Forms/KeysConverter/Overview/Form1.vb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
'<Snippet1>
1+
Imports System.Windows.Forms
2+
3+
'<Snippet1>
24
Public Class Form1
35
Public Shared Sub Main()
46
End Sub

snippets/visualbasic/System.Windows.Forms/MouseEventArgs/Overview/Form1.vb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
Public Class Form1
1+
Imports System.Windows.Forms
2+
3+
Public Class Form1
24
Public Shared Sub Main()
35
End Sub
46

0 commit comments

Comments
 (0)