[RESOLVED] Visual Basic 2008 Doesnt save the CHANGES
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
http://img813.imageshack.us/img813/2678/ex1x.png
Uploaded with ImageShack.us
FORM 2
http://img156.imageshack.us/img156/5272/ex2p.png
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.
Re: Visual Basic 2008 Doesnt save the CHANGES
Quote:
Originally Posted by
cary1234
but everytime i close the program and re-run it the changes doesnt save. :( help please.
That makes perfect sense.
You are not saving the changes anywhere.
You need to save these changes off to an external source, then each time your program opens, it needs to read that source, and apply whatever has been last saved.
Re: Visual Basic 2008 Doesnt save the CHANGES
Quote:
You need to save these changes off to an external source, then each time your program opens, it needs to read that source, and apply whatever has been last saved.
Can you teach me how to do that? Im just a newbie.
Re: Visual Basic 2008 Doesnt save the CHANGES
Re: Visual Basic 2008 Doesnt save the CHANGES
Re: Visual Basic 2008 Doesnt save the CHANGES
Thanks for the replies. I think i understand. Thanks for the links.
I watched this video on youtube and it helps me http://www.youtube.com/watch?v=mGXH-Lsbuzo
Where can i find the application settings? When i go to Build then Build Application the application settings must be in the desktop(thats what i see in the video).
Re: Visual Basic 2008 Doesnt save the CHANGES