This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Select Case e.KeyCode | |
Case Keys.Tab | |
e.IsInputKey = True | |
End Select |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dim Year As String = Text.ToString.Substring(0, 2) | |
Dim Month As String = Text.ToString.Substring(2, 2) | |
Dim Day As String = Text.ToString.Substring(4, 2) | |
Try | |
'日付型に変換して有効な値が設定されているか確認する | |
Dim tmp As String = String.Format("20{0}/{1}/{2}", Year, Month, Day) | |
DateTime.Parse(tmp) | |
Catch | |
MessageBox.Show("有効な日付を設定してください") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'文字列の場合 | |
txtTokuisakiCode.Text = form.code.PadLeft(4, "0"c) | |
'数値の場合 | |
txtTokuisakiCode.Text = String.Format("{0:0000}", form.code) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dim i As Integer = 0 | |
For Each row In dsDetail.Tables(0).Rows | |
Dim form As New DetailForm With { | |
.TopLevel = False, | |
.Size = New Size(1048, 58), | |
.Location = New Point(0, i * 57) | |
} | |
pnlDetail.Controls.Add(form) | |
form.Show() | |
form.BringToFront() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dim column As New DataGridViewButtonColumn With { | |
.UseColumnTextForButtonValue = True | |
} | |
dgvMasterList.Columns.Add(column) | |
dgvMasterList.DataSource = dtTarget | |
For Each row As DataGridViewRow In dgvMasterList.Rows | |
Dim strBtn As String = String.Format("{0}-{1}", row.Cells(1).Value, row.Cells(2).Value) | |
Dim newcell As New DataGridViewButtonCell() With { | |
.Value = strBtn |