Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Toolbar disappears after form activate

Status
Not open for further replies.

rkasnick

Programmer
Apr 28, 2003
66
US
I added a toolbar to my app at the very end of development. Here's what happens: when the form is activated and while the form loads a listbox the toolbar and all buttons are visible, but as soon as the listbox is fully populated the buttons go invisible. I can click on where the buttons are on the form then they become visible, OR when I step through the program at the end of stepping the buttons remain visible, but when the program runs normally they turn invisible. I have checked all properties on the toolbar and buttons and they are all enabled and visible. The toolbar iteslf does not turn invisble, only the buttons.
I have tried forcing the buttons visible as the last line of code but it still doesn't work.

Can anyone point me in the right direction to solve this?
 
To be honest it sounds to me like a graphics driver problem. I had a similar problem where all the toolbar buttons would come out as black squares, and I confirmed that VB wasn't at fault by changing the colour depth setting in Windows. I turned out that the screen driver was at fault and an updated driver fixed it.

If you haven't added any code to create the effect you're seeing then chances are it's not a programming fault. The symptoms you're getting don't point to a program error.

The only other possibility may be that the list you're filling has so many items that there is no memory available to display the toolbar buttons. Can you try loading the form without filling the list?


- Andy
___________________________________________________________________
If you think nobody cares you're alive, try missing a couple of mortgage payments
 
Thanks, Andy, for the response. This issue happens whether there are images in the imagelist or not. I set up a test project and put a toolbar on a form in it and it worked perfectly there. That's what led me to believe it was somehow a programming issue. I have decided to replace the toolbar with command buttons with their format set to GRAPHICAL as an alternative. It works just as well with a little more overhead.

Thanks again.

Regards,
Rod
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top