質問編集履歴
1
コードの表示
test
CHANGED
File without changes
|
test
CHANGED
@@ -2,91 +2,71 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
-
|
5
|
+
```ここに言語を入力
|
6
6
|
|
7
|
-
|
7
|
+
Private Sub Button_Click(sender As Object, e As EventArgs) Handles Button.Click
|
8
8
|
|
9
|
+
DataGridView1.ClearSelection()
|
9
10
|
|
11
|
+
Dim hasData As Boolean = False
|
10
12
|
|
11
|
-
|
13
|
+
Dim resultIndex As Int32 = 0
|
12
14
|
|
13
|
-
|
15
|
+
For i As Integer = 0 To DataGridView1.RowCount - 1
|
14
16
|
|
15
|
-
|
17
|
+
Dim inputString1 As String = DataGridView1.Rows(i).Cells("0").Value
|
16
18
|
|
19
|
+
Dim inputString2 As String = DataGridView1.Rows(i).Cells("1").Value
|
17
20
|
|
21
|
+
Dim inputString3 As String = DataGridView1.Rows(i).Cells("2").Value
|
18
22
|
|
19
|
-
|
23
|
+
Dim inputString4 As String = DataGridView1.Rows(i).Cells("3").Value
|
20
24
|
|
21
|
-
|
25
|
+
If Textbox1.Text = inputString1 Then
|
22
26
|
|
23
|
-
|
27
|
+
hasData = True
|
24
28
|
|
25
|
-
|
29
|
+
resultIndex = i
|
26
30
|
|
31
|
+
End If
|
27
32
|
|
33
|
+
If Textbox2.Text = inputString2 Then
|
28
34
|
|
35
|
+
hasData = True
|
29
36
|
|
37
|
+
resultIndex = i
|
30
38
|
|
31
|
-
|
39
|
+
End If
|
32
40
|
|
33
|
-
|
41
|
+
If Textbox3.Text= inputString3 Then
|
34
42
|
|
35
|
-
|
43
|
+
hasData = True
|
36
44
|
|
37
|
-
|
45
|
+
resultIndex = i
|
38
46
|
|
47
|
+
End If
|
39
48
|
|
49
|
+
If Textbox4.Text = inputString4 Then
|
40
50
|
|
51
|
+
hasData = True
|
41
52
|
|
53
|
+
resultIndex = i
|
42
54
|
|
43
|
-
|
55
|
+
End If
|
44
56
|
|
45
|
-
|
57
|
+
If hasData = True Then
|
46
58
|
|
47
|
-
|
59
|
+
DataGridView1.Rows(resultIndex).Selected = True
|
48
60
|
|
49
|
-
|
61
|
+
Else
|
50
62
|
|
63
|
+
MessageBox.Show("該当なし")
|
51
64
|
|
65
|
+
End If
|
52
66
|
|
67
|
+
Next
|
53
68
|
|
54
|
-
|
55
|
-
If Textbox3.Text= inputString3 Then
|
56
|
-
|
57
|
-
hasData = True
|
58
|
-
|
59
|
-
resultIndex = i
|
60
|
-
|
61
|
-
End If
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
If Textbox4.Text = inputString4 Then
|
68
|
-
|
69
|
-
hasData = True
|
70
|
-
|
71
|
-
resultIndex = i
|
72
|
-
|
73
|
-
End If
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
If hasData = True Then
|
80
|
-
|
81
|
-
DataGridView1.Rows(resultIndex).Selected = True
|
82
|
-
|
83
|
-
|
69
|
+
```
|
84
|
-
|
85
|
-
MessageBox.Show("該当なし")
|
86
|
-
|
87
|
-
End If
|
88
|
-
|
89
|
-
Next
|
90
70
|
|
91
71
|
|
92
72
|
|