Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

VB question

Options
  • 10-10-2006 3:42pm
    #1
    Closed Accounts Posts: 5,372 ✭✭✭


    I made a prototype program on VB to show what a furure project is going to do. I have a picture box for an FAQ section, and I have the code to populate it.

    when I push the button to show only the FAQ section, it pops up, but nothing comes up on the picture box. If I click it again, the text does show, but there is a space where the text should have been the first time. I can't figure out why the text does not show up the first time. I tried making the text come up using a different button, and it worked first time, but I would rather have it all come up with just one button press.

    to get all the picture boxes and combo boxes and such to only appear when I need them I used a lot of *name*.visible=false, and made only the ones I want to see .visible=true, and I think that is having an effect on the text.

    If you need it I can supply the program (it's very small and basic, no functions, it's just a blueprint)


Comments

  • Registered Users Posts: 7,677 ✭✭✭Trampas


    Post up all your code


  • Closed Accounts Posts: 5,372 ✭✭✭The Bollox


    right here it is.

    It must be something to do with the visible procedure


  • Closed Accounts Posts: 17 Merik


    After

    cmdLogon.Visible = False

    Enter
    Refresh

    which will cause the form to refresh.

    so the code looks like this
    cmdLogon.Visible = False
    Refresh

    picFAQ.Print "Question: what is Airsoft?"


    I can only assume the screen has not refreshed properly when it gets to the .print statement.


  • Closed Accounts Posts: 5,372 ✭✭✭The Bollox


    brilliant, thanks a lot


  • Registered Users Posts: 2,781 ✭✭✭amen


    check out
    DoEvents as well


  • Advertisement
  • Registered Users Posts: 15,443 ✭✭✭✭bonkey


    If my memory isn't playing tricks on me, there's a Redraw property on PictureBox controls which you might also want to check up.

    Or maybe its on all controls. I can't remember....


Advertisement