Results 1 to 7 of 7

Thread: [RESOLVED] Visual Basic 2008 Doesnt save the CHANGES

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2009
    Posts
    253

    Resolved [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




    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.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Visual Basic 2008 Doesnt save the CHANGES

    Quote Originally Posted by cary1234 View Post
    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.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Oct 2009
    Posts
    253

    Re: Visual Basic 2008 Doesnt save the CHANGES

    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.

  4. #4
    Addicted Member vb_ftw's Avatar
    Join Date
    Dec 2010
    Posts
    139

    Re: Visual Basic 2008 Doesnt save the CHANGES


  5. #5
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Oct 2009
    Posts
    253

    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).

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Oct 2009
    Posts
    253

    Re: Visual Basic 2008 Doesnt save the CHANGES

    Oops, i found it. sorry.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width