回答編集履歴

3

誤記訂正

2017/05/11 10:38

投稿

satou
satou

スコア19

test CHANGED
@@ -80,13 +80,13 @@
80
80
 
81
81
  End Sub
82
82
 
83
- Public Structure DataStructure
83
+ Public Structure DataStructure
84
84
 
85
- Dim ID AsInteger
85
+ Dim ID As Integer
86
86
 
87
- '.............
87
+ '.............
88
88
 
89
- End Structure
89
+ End Structure
90
90
 
91
91
  End Class
92
92
 

2

誤記訂正

2017/05/11 10:38

投稿

satou
satou

スコア19

test CHANGED
@@ -32,17 +32,23 @@
32
32
 
33
33
  Private Sub 子フォーム_UpClick(sender As Object, e As EventArgs)
34
34
 
35
- with DataGridView1
35
+ With DataGridView1
36
36
 
37
37
  '1行上を選択
38
38
 
39
39
  '新たに選択した行のデータを取得
40
40
 
41
- 子フォーム.SetData(.....)
41
+ Dim _data as New DataStructure
42
42
 
43
- end with
43
+ _data.ID=....
44
44
 
45
+
46
+
47
+ 子フォーム.SetData( _data )
48
+
49
+ End With
50
+
45
- end sub
51
+ End Sub
46
52
 
47
53
  End Class
48
54
 
@@ -56,9 +62,9 @@
56
62
 
57
63
  '親フォームからデータを取得
58
64
 
59
- Public Sub SetData(....)
65
+ Public Sub SetData(ByVal d As DataStructure)
60
66
 
61
- label_id.text=.....
67
+ label_id.text=d.ID
62
68
 
63
69
  '......表示
64
70
 
@@ -74,12 +80,14 @@
74
80
 
75
81
  End Sub
76
82
 
83
+ Public Structure DataStructure
77
84
 
85
+ Dim ID AsInteger
86
+
87
+ '.............
88
+
89
+ End Structure
78
90
 
79
91
  End Class
80
92
 
81
-
82
-
83
-
84
-
85
93
  ```

1

誤記訂正

2017/05/11 10:37

投稿

satou
satou

スコア19

test CHANGED
@@ -12,7 +12,7 @@
12
12
 
13
13
  ```ここに言語を入力
14
14
 
15
- PPublic Class 親フォーム
15
+ Public Class 親フォーム
16
16
 
17
17
 
18
18
 
@@ -32,7 +32,7 @@
32
32
 
33
33
  Private Sub 子フォーム_UpClick(sender As Object, e As EventArgs)
34
34
 
35
- with datagridview1
35
+ with DataGridView1
36
36
 
37
37
  '1行上を選択
38
38
 
@@ -68,7 +68,7 @@
68
68
 
69
69
  '上をクリックした旨のイベントを発行
70
70
 
71
- Private Sub ButtonUp(....) Handles ButtonUp.Click
71
+ Private Sub ButtonUp_Click(sender As Object, e As EventArgs) Handles ButtonUp.Click
72
72
 
73
73
  RaiseEvent UpClick(Me, New EventArgs)
74
74