I can't seem to get text to display in a list box or combo box when I run the Form_Load procedure

Good morning all
I can't seem to get text to display in a list box or combo box when I run the Form_Load procedure, I am working off of an old version of VB studio.net and I am wondering if the tag has changed and that is why you can't see them when I run the application??
Code I have is this, which is correct for the 2003 version? Why not for the 2002 version?


ListBox1.Items.Add("U.S. Dollar")
ComboBox1.Items.Add("U.S. Dollar")
Thanks
sgfriskeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Erick37Commented:
Private Sub Form_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Make sure that the Form_Load procedure is actually being called.  Check the handler "Handles Mybase.Load" at the end.
sgfriskeAuthor Commented:
Here is my code I do have the handles mybase.load in it

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'These program statements run when the form loads
        PictureBox1.Image = System.Drawing.Image.FromFile _
          ("c:\vbnet03sbs\chap03\input controls\pcomputr.bmp")
        'Add items to a list box like this:
        ListBox1.Items.Add("Extra hard disk")
        ListBox1.Items.Add("Printer")
        ListBox1.Items.Add("Satellite dish")
        'Combo boxes are also filled with the Add method:
        ComboBox1.Items.Add("U.S. Dollars")
        ComboBox1.Items.Add("Check")
        ComboBox1.Items.Add("English Pounds")
    End Sub

it works fine I can't get the List box and combo box items to display for the users
planoczCommented:
Your code works, but I have seen that sometimes the form gets missed up internally.
I would try making a new form and re-do the controls and try again.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Joe_GriffithCommented:
I copied your code into a project and it works fine.  What happens if you single step thru the procedure?
sgfriskeAuthor Commented:
OK I will give that a shot, they have not changed the syntak since the 2002 version of VB studio.net?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.