Adding a menu makes objects disappear?

eric0213 used Ask the Experts™
I have a grid of textboxes, created at runtime, stored inside a frame.  The frame is within another frame which I use to make it scrollable.  Works great!

Then yesterday I added a menu to the form and all of a sudden the objects that need to be scrolled down to to be seen, aren't there.  The scrollbar thinks they're there because you can scroll down, but it's just an empty gray area.

If you exit the form and come back, a couple more text boxes can be seen.  If you repeat this, they all eventually can be seen.

They're not showing up because of some functions that get triggered on the form loading or painted, because I tried calling all those events repeated on startup.

In one area, I asked if the object I set to be visible was:
    gridCol1(3).Visible = True
    MsgBox gridCol1(3).Visible ' pops up "False"

Later, I asked if the object was visible and it said it was, even though you couldn't see it.  I check the left and top properties and it should've been visible.

I think it sounds screwy... anybody have an idea?

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

sounds like refresh problem. They can be tricky. Maybe Paint events are firing each other?  How about the universal medicin, DoEvents?



Everywhere! Just kidding. Let me read your question again.
It is odd that simply adding a menu would cause your update problems suddenly. Have you tried to remove the menu and see if problems disappears? I don't quite understand this part of your question:

"They're not showing up because of some functions that get triggered on the form loading or painted, because I tried calling all those events repeated on startup."

Could you elaborate?

Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!


Removed the menu and it shows up great.

I have a few functions that get called to initialize the form -- which also create the objects that aren't getting shown.

The form doesn't actually close down, it hides itself on unload.  The form_load and paint and other functions are empty because the init and update functions I call take care of everything.

I am guessing a lot here. Would be better off with some code from you. but...

So do you that during Unload event, you set cancel to false and hides the form? Or don't you set cancel at all?

cancel is set to false as default and if you don't set it to true, your form will be unloaded. That means next time you show your form by calling .show or setting .visible to true, form_load will be called. Are you calling these init functions inside form_load? If you don't, they won't get updated correctly.


cancel is set to true, then i say me.hide

the initilization functions get explicitly from other forms

I am lost. I have had problems with refresh some times because I put code in resize event instead of paint event and so on. But never a case when adding a menu would cause your kind of problem. Your code would be interesting to look over. Hope somebody can help you.
Author of the Year 2009

Hi eric0213,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Refund points and save as a 0-pt PAQ.

eric0213, Please DO NOT accept THIS comment as an answer.
EXPERTS: Post a comment if you are certain that an expert deserves credit.  Explain why.
DanRollins -- EE database cleanup volunteer
per recommendation

Community Support Moderator @Experts Exchange

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial