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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disappearing controls

Status
Not open for further replies.

Andrzejek

Programmer
Jan 10, 2006
8,486
5
38
US
I have a Form in my Project (project has many, many forms) where some controls – mostly on a Frame – disappear sometimes, and this is a problem: sometimes. The controls (command buttons, labels, etc) are there because I have Mouse_Move events on some controls and they works just fine. I can even click on a command button (which I can not see), and it will work OK which means to me that only display is gone, but controls are there.

When that happens, I can Alt-Tab to another app, and return to my VB one and all controls re-appear and look normal.

I did try
1. Me.Refresh – no change.
2. Change Display rate on my monitor – no change
3. Step thru my code to see what’s going on – and it does not happen, but if I just run my program, it will happen.

Any clues…..?


Have fun.

---- Andy
 
having the same problem with 1 command button on 1 form not in a frame and have tried everything. it seems to be a painting problem but never have found a solution to it.... everyone just kind of knows the button really is there....

would love to find a solution.
 
Andy, Try Frame.Refresh in the Form Activate event. I've had a simialar problem but it was with a FramePlus control, not the standard frame.

azrobert, Try Me.Refresh in the Form Activate event.

Tom


Tom
 
Never had this problem normally except where the appl is running out of resources and nearing a crash.
Maybe you have a memory leak or a routine that calls itself or interrupts a sub without letting it finish?
Observe the available memory over a period and see if it slowly gets less as you use the program. If so you have such a problem.
When you finish with anything that uses the SET MyControl or OPEN MyControl you should SET TheControl = Nothing when you have finished with it otherwise some memory can get left behind.
Search for Memory leaks
 
I dont know if you already resolved this issue, but if you set the AUTOREDRAW property to true for the form that contains the controls your problem should be fixed.
 

No, I still work on this problem.

I only user VB controls, no 3rd party controls

And Form's AutoRedrew is set to True.


Have fun.

---- Andy
 
I have also had this problem with checkboxes in a frame. If I click where I know the checkboxes are they will appear. This only occurs with the VB Frame. If I use a third party frame - no issues.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top