What im trying to do is everytime i put a check in listbox1 or listbox2 the button1 or button2 in form2 will be invisible, but im having problem because if i go back to form 1 then check again form2 the changes that i made didnt save!

FOR EXAMPLE

i checked hide button1 then pressed APPLY! then i go to form2 i will see only button2 (yes the code works great!) but when i pressed back then go back to form2 again the code didnt work.

Heres my code:

FORM 1
Code:
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If CheckBox1.Checked = True Then
            Form2.Button1.Visible = False
        Else

            Form2.Button1.Visible = True
        End If

        If CheckBox2.Checked = True Then
            Form2.Button2.Visible = False
        Else
            Form2.Button2.Visible = True
        End If

    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Form2.Show()
        Me.Hide()
    End Sub
End Class
FORM 2

Code:
Public Class Form2

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Form1.Show()
        Me.Close()
    End Sub
End Class
print screen

FORM 1




Uploaded with ImageShack.us


FORM 2


Uploaded with ImageShack.us



I try to change the code in form 2 to this

Code:
Public Class Form2

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Form1.Show()
        Me.hide()
    End Sub
End Class
but everytime i close the program and re-run it the changes doesnt save. help please.