質問編集履歴
2
``` 追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -274,6 +274,8 @@
|
|
274
274
|
|
275
275
|
|
276
276
|
|
277
|
+
```
|
278
|
+
|
277
279
|
|
278
280
|
|
279
281
|
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
@@ -408,7 +410,7 @@
|
|
408
410
|
|
409
411
|
|
410
412
|
|
411
|
-
|
413
|
+
```
|
412
414
|
|
413
415
|
End Sub
|
414
416
|
|
1
プログラム
test
CHANGED
File without changes
|
test
CHANGED
@@ -12,6 +12,270 @@
|
|
12
12
|
|
13
13
|
|
14
14
|
|
15
|
+
Imports Microsoft.Office.Interop
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
20
|
+
|
21
|
+
Partial Class Form1
|
22
|
+
|
23
|
+
Inherits System.Windows.Forms.Form
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
'フォームがコンポーネントの一覧をクリーンアップするために dispose をオーバーライドします。
|
28
|
+
|
29
|
+
<System.Diagnostics.DebuggerNonUserCode()>
|
30
|
+
|
31
|
+
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
32
|
+
|
33
|
+
Try
|
34
|
+
|
35
|
+
If disposing AndAlso components IsNot Nothing Then
|
36
|
+
|
37
|
+
components.Dispose()
|
38
|
+
|
39
|
+
End If
|
40
|
+
|
41
|
+
Finally
|
42
|
+
|
43
|
+
MyBase.Dispose(disposing)
|
44
|
+
|
45
|
+
End Try
|
46
|
+
|
47
|
+
End Sub
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
'Windows フォーム デザイナーで必要です。
|
52
|
+
|
53
|
+
Private components As System.ComponentModel.IContainer
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
'メモ: 以下のプロシージャは Windows フォーム デザイナーで必要です。
|
58
|
+
|
59
|
+
'Windows フォーム デザイナーを使用して変更できます。
|
60
|
+
|
61
|
+
'コード エディターを使って変更しないでください。
|
62
|
+
|
63
|
+
<System.Diagnostics.DebuggerStepThrough()>
|
64
|
+
|
65
|
+
Private Sub InitializeComponent()
|
66
|
+
|
67
|
+
Me.Button1 = New System.Windows.Forms.Button()
|
68
|
+
|
69
|
+
Me.Label1 = New System.Windows.Forms.Label()
|
70
|
+
|
71
|
+
Me.Label2 = New System.Windows.Forms.Label()
|
72
|
+
|
73
|
+
Me.DateTimePicker1 = New System.Windows.Forms.DateTimePicker()
|
74
|
+
|
75
|
+
Me.TextBox1 = New System.Windows.Forms.TextBox()
|
76
|
+
|
77
|
+
Me.TextBox2 = New System.Windows.Forms.TextBox()
|
78
|
+
|
79
|
+
Me.DateTimePicker2 = New System.Windows.Forms.DateTimePicker()
|
80
|
+
|
81
|
+
Me.Button2 = New System.Windows.Forms.Button()
|
82
|
+
|
83
|
+
Me.SuspendLayout()
|
84
|
+
|
85
|
+
'
|
86
|
+
|
87
|
+
'Button1
|
88
|
+
|
89
|
+
'
|
90
|
+
|
91
|
+
Me.Button1.Location = New System.Drawing.Point(51, 198)
|
92
|
+
|
93
|
+
Me.Button1.Name = "Button1"
|
94
|
+
|
95
|
+
Me.Button1.Size = New System.Drawing.Size(75, 39)
|
96
|
+
|
97
|
+
Me.Button1.TabIndex = 1
|
98
|
+
|
99
|
+
Me.Button1.Text = "出勤"
|
100
|
+
|
101
|
+
Me.Button1.UseVisualStyleBackColor = True
|
102
|
+
|
103
|
+
'
|
104
|
+
|
105
|
+
'Label1
|
106
|
+
|
107
|
+
'
|
108
|
+
|
109
|
+
Me.Label1.AutoSize = True
|
110
|
+
|
111
|
+
Me.Label1.Location = New System.Drawing.Point(131, 208)
|
112
|
+
|
113
|
+
Me.Label1.Name = "Label1"
|
114
|
+
|
115
|
+
Me.Label1.Size = New System.Drawing.Size(0, 18)
|
116
|
+
|
117
|
+
Me.Label1.TabIndex = 3
|
118
|
+
|
119
|
+
'
|
120
|
+
|
121
|
+
'Label2
|
122
|
+
|
123
|
+
'
|
124
|
+
|
125
|
+
Me.Label2.AutoSize = True
|
126
|
+
|
127
|
+
Me.Label2.Location = New System.Drawing.Point(48, 152)
|
128
|
+
|
129
|
+
Me.Label2.Name = "Label2"
|
130
|
+
|
131
|
+
Me.Label2.Size = New System.Drawing.Size(0, 18)
|
132
|
+
|
133
|
+
Me.Label2.TabIndex = 4
|
134
|
+
|
135
|
+
'
|
136
|
+
|
137
|
+
'DateTimePicker1
|
138
|
+
|
139
|
+
'
|
140
|
+
|
141
|
+
Me.DateTimePicker1.CustomFormat = "yyyy/MM/dd HHmm"
|
142
|
+
|
143
|
+
Me.DateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom
|
144
|
+
|
145
|
+
Me.DateTimePicker1.Location = New System.Drawing.Point(51, 108)
|
146
|
+
|
147
|
+
Me.DateTimePicker1.Name = "DateTimePicker1"
|
148
|
+
|
149
|
+
Me.DateTimePicker1.Size = New System.Drawing.Size(253, 25)
|
150
|
+
|
151
|
+
Me.DateTimePicker1.TabIndex = 5
|
152
|
+
|
153
|
+
'
|
154
|
+
|
155
|
+
'TextBox1
|
156
|
+
|
157
|
+
'
|
158
|
+
|
159
|
+
Me.TextBox1.Location = New System.Drawing.Point(51, 152)
|
160
|
+
|
161
|
+
Me.TextBox1.Name = "TextBox1"
|
162
|
+
|
163
|
+
Me.TextBox1.Size = New System.Drawing.Size(300, 25)
|
164
|
+
|
165
|
+
Me.TextBox1.TabIndex = 6
|
166
|
+
|
167
|
+
'
|
168
|
+
|
169
|
+
'TextBox2
|
170
|
+
|
171
|
+
'
|
172
|
+
|
173
|
+
Me.TextBox2.Location = New System.Drawing.Point(374, 152)
|
174
|
+
|
175
|
+
Me.TextBox2.Name = "TextBox2"
|
176
|
+
|
177
|
+
Me.TextBox2.Size = New System.Drawing.Size(298, 25)
|
178
|
+
|
179
|
+
Me.TextBox2.TabIndex = 7
|
180
|
+
|
181
|
+
'
|
182
|
+
|
183
|
+
'DateTimePicker2
|
184
|
+
|
185
|
+
'
|
186
|
+
|
187
|
+
Me.DateTimePicker2.CustomFormat = "yyyy/MM/dd HHmm"
|
188
|
+
|
189
|
+
Me.DateTimePicker2.Format = System.Windows.Forms.DateTimePickerFormat.Custom
|
190
|
+
|
191
|
+
Me.DateTimePicker2.Location = New System.Drawing.Point(374, 108)
|
192
|
+
|
193
|
+
Me.DateTimePicker2.Name = "DateTimePicker2"
|
194
|
+
|
195
|
+
Me.DateTimePicker2.Size = New System.Drawing.Size(261, 25)
|
196
|
+
|
197
|
+
Me.DateTimePicker2.TabIndex = 8
|
198
|
+
|
199
|
+
'
|
200
|
+
|
201
|
+
'Button2
|
202
|
+
|
203
|
+
'
|
204
|
+
|
205
|
+
Me.Button2.Location = New System.Drawing.Point(374, 198)
|
206
|
+
|
207
|
+
Me.Button2.Name = "Button2"
|
208
|
+
|
209
|
+
Me.Button2.Size = New System.Drawing.Size(73, 39)
|
210
|
+
|
211
|
+
Me.Button2.TabIndex = 9
|
212
|
+
|
213
|
+
Me.Button2.Text = "退勤"
|
214
|
+
|
215
|
+
Me.Button2.UseVisualStyleBackColor = True
|
216
|
+
|
217
|
+
'
|
218
|
+
|
219
|
+
'Form1
|
220
|
+
|
221
|
+
'
|
222
|
+
|
223
|
+
Me.AutoScaleDimensions = New System.Drawing.SizeF(10.0!, 18.0!)
|
224
|
+
|
225
|
+
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
226
|
+
|
227
|
+
Me.ClientSize = New System.Drawing.Size(800, 450)
|
228
|
+
|
229
|
+
Me.Controls.Add(Me.Button2)
|
230
|
+
|
231
|
+
Me.Controls.Add(Me.DateTimePicker2)
|
232
|
+
|
233
|
+
Me.Controls.Add(Me.TextBox2)
|
234
|
+
|
235
|
+
Me.Controls.Add(Me.TextBox1)
|
236
|
+
|
237
|
+
Me.Controls.Add(Me.DateTimePicker1)
|
238
|
+
|
239
|
+
Me.Controls.Add(Me.Label2)
|
240
|
+
|
241
|
+
Me.Controls.Add(Me.Label1)
|
242
|
+
|
243
|
+
Me.Controls.Add(Me.Button1)
|
244
|
+
|
245
|
+
Me.Name = "Form1"
|
246
|
+
|
247
|
+
Me.Text = "Form1"
|
248
|
+
|
249
|
+
Me.ResumeLayout(False)
|
250
|
+
|
251
|
+
Me.PerformLayout()
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
End Sub
|
256
|
+
|
257
|
+
Friend WithEvents Button1 As Button
|
258
|
+
|
259
|
+
Friend WithEvents Label1 As Label
|
260
|
+
|
261
|
+
Friend WithEvents Label2 As Label
|
262
|
+
|
263
|
+
Friend WithEvents DateTimePicker1 As DateTimePicker
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
Private Sub DateTimePicker1_ValueChanged(sender As Object, e As EventArgs) Handles DateTimePicker1.ValueChanged
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
End Sub
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
15
279
|
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
16
280
|
|
17
281
|
Dim valueString As String
|
@@ -147,3 +411,45 @@
|
|
147
411
|
|
148
412
|
|
149
413
|
End Sub
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
Friend WithEvents TextBox1 As TextBox
|
418
|
+
|
419
|
+
Friend WithEvents TextBox2 As TextBox
|
420
|
+
|
421
|
+
Friend WithEvents DateTimePicker2 As DateTimePicker
|
422
|
+
|
423
|
+
|
424
|
+
|
425
|
+
Private Sub DateTimePicker2_ValueChanged(sender As Object, e As EventArgs) Handles DateTimePicker2.ValueChanged
|
426
|
+
|
427
|
+
|
428
|
+
|
429
|
+
End Sub
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
Friend WithEvents Button2 As Button
|
434
|
+
|
435
|
+
|
436
|
+
|
437
|
+
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
|
438
|
+
|
439
|
+
Dim valueString As String
|
440
|
+
|
441
|
+
Dim text As String
|
442
|
+
|
443
|
+
|
444
|
+
|
445
|
+
valueString = DateTimePicker2.Value.ToShortDateString()
|
446
|
+
|
447
|
+
text = DateTimePicker2.Text
|
448
|
+
|
449
|
+
|
450
|
+
|
451
|
+
TextBox2.Text = ControlChars.NewLine & text
|
452
|
+
|
453
|
+
End Sub
|
454
|
+
|
455
|
+
End Class
|