Imports System.Runtime.InteropServices   'これが無いと Marshal が宣言されていないとエラーになる 

Public Class Form2

    Private Sub Form2_Load(ByVal sender As System.Object, _
                    ByVal e As System.EventArgs) Handles MyBase.Load

        If System.IO.File.Exists(Position_ini_filename) Then
            GetIniPosition_Form2()

            With l_WINDOWPLACEMENT
                If .rcNormalPosition.Right = 0 Then
                    .showCmd = showCmd_SW.SW_SHOWNORMAL
                Else
                    l_blnRet = SetWindowPlacement(l_ptr, l_WINDOWPLACEMENT)
                End If
            End With
        Else
            l_WINDOWPLACEMENT.Length = Marshal.SizeOf(GetType(WINDOWPLACEMENT))
            With l_WINDOWPLACEMENT
                .showCmd = showCmd_SW.SW_SHOWNORMAL
            End With
            l_blnRet = SetWindowPlacement(l_ptr, l_WINDOWPLACEMENT)
        End If

    End Sub

    Private Sub Button1_Click(ByVal sender As System.ObjectByVal e As System.EventArgs) Handles Button1.Click
        Form1.Show()
        Me.Hide()
    End Sub
End Class