|
一応コードも載せておきますね Public Class Form2
Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load Me.Width = Screen.GetWorkingArea(Me).Width Me.Location = New Point(0, 400) Label1.Text = Form1.Label50.Text Label2.Text = Form1.Label53.Text Label3.Text = Form1.j & "日" Button6.Hide() Label4.Hide() End Sub
Private Sub Label1_Click(sender As Object, e As EventArgs) Handles Label1.Click
End Sub
Private Sub Label2_Click(sender As Object, e As EventArgs) Handles Label2.Click
End Sub
Private Sub Label3_Click(sender As Object, e As EventArgs) Handles Label3.Click
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click TextBox1.Show() Button5.Show() Button6.Show() Label5.Hide() Label6.Hide() End Sub
Private Sub Button5_Click(sender As System.Object, e As System.EventArgs) Handles Button5.Click Dim hiduke(1211, 30) As String '2次元配列を使って日記を保存 Dim tukiString As String = Label2.Text 'left関数を使うために数値化したやつ Dim hinitiString As String = Label3.Text 'left関数を使うために日付を数値化したやつ Dim tosi As Integer = Integer.Parse(Mid(Label1.Text, 2, 3)) * 12 '年 Dim tuki As Integer = Integer.Parse(Microsoft.VisualBasic.Left(tukiString, Len(tukiString) - 1)) '月 Dim hiniti As Integer = Integer.Parse(Microsoft.VisualBasic.Left(hinitiString, Len(hinitiString) - 1)) '日にち Dim kizyutu As String
hiduke(tosi + tuki, hiniti) = TextBox1.Text MsgBox(hiduke(tosi + tuki, hiniti), vbOKOnly, "書き込みが完了しました") kizyutu = hiduke(tosi + tuki, hiniti).Clone End Sub
Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click Dim hiduke(1211, 30) As String '2次元配列を使って日記を保存 Dim tukiString As String = Label2.Text 'left関数を使うために年を数値化したやつ Dim hinitiString As String = Label3.Text 'left関数を使うために日付を数値化したやつ Dim tosi As Integer = Integer.Parse(Mid(Label1.Text, 2, 3)) * 12 '年 Dim tuki As Integer = Integer.Parse(Microsoft.VisualBasic.Left(tukiString, Len(tukiString) - 1)) '月 Dim hiniti As Integer = Integer.Parse(Microsoft.VisualBasic.Left(hinitiString, Len(hinitiString) - 1)) '日にち Dim kizyutu As String MsgBox(kizyutu, vbOKOnly, "過去の記述")
End Sub End Class
|