Results 1 to 3 of 3

Thread: Can anyone help me on this toughy?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2003
    Location
    colorado
    Posts
    17

    Question Can anyone help me on this toughy?

    probably only a toughy to me...

    This project i'm working on is a Game Organizer

    Okay, first of all i have a menu that allows people to go to the second form, that works just dandy, i just say

    VB Code:
    1. Private Sub mnueditnew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnueditnew.Click
    2.         Me.Hide()
    3.         Dim Form2 As New frmnewgame()
    4.         Form2.Show()
    5.     End Sub

    Okay no problem, then when it comes up with the small screen, it has a list of options that you can chose from, varying from comboboxes to textboxes, when that's done i want it to close that screen and open up the previous screen with the new item added, so i used this code (pretend Items = every option combined)

    VB Code:
    1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    2.         Dim Form1 As New frmplay()
    3.         Me.Hide()
    4.         Form1.ListBox1.Items.Add(Items)
    5.         Form1.Show()
    6.     End Sub

    Now that works, but whenever i try and do it again, it clears the list...

    I think it's because i'm declaring the form as a new form, but when i get rid of the new, it won't work...

    Question 1:

    is there another way of doing this so it organizes the information in it's own little spreadsheet format, so i don't have to add all the items together into one large variable?

    Question 2:

    if not, is there a way that it won't clear the list every time i go back to the form?

    sorry this is rather lengthy...
    Last edited by SamuraiMooCow; Mar 3rd, 2003 at 03:54 PM.

  2. #2
    Frenzied Member MrGTI's Avatar
    Join Date
    Oct 2000
    Location
    Ontario, Canada
    Posts
    1,277

    Smile

    First of all, you should go read what i just finished chatting with Lunatic3 about over here: Data across two forms

    VB.NET doesn't work like VB6, so it takes a different mindset to grasp a few of the changes. It might seem weird at first, but in the long run it's actually better.
    ~Peter


  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2003
    Location
    colorado
    Posts
    17
    thanks

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