General discussion

Locked

VB 6 forms flutter

By ivancarr ·
We have developed a program using VB6. We have a problem with some of the windows that cause fluttering. We have solved the problem by unloading the window before loading the next window but we need a better solution.

This is what happens. We have 3 windows 1, 2, 3.
If we load window 1 nothing unusual happens. Leaving 1 open we load 2 and nothing unusual happens. Leaving 1 and 2 open we load 3 and rapid fluttering occurs between the windows and the program hangs.

Any suggestion would be appreciated.

Ivan

This conversation is currently closed to new comments.

9 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by Seagull Data Services In reply to VB 6 forms flutter

What do you mean by fluttering?
Is it screen flicker or does the focus change rapidly between the forms?

Collapse -

by ivancarr In reply to

I believe that focus changes rapidly between the forms.

Collapse -

by Seagull Data Services In reply to VB 6 forms flutter

Can you give us more details on what the forms are doing?
e.g. startup events, are forms modal, timer events?

Collapse -

by ivancarr In reply to

The program loads the main.frm (the MDI form). All other forms are loaded within main.frm and are MDIChild. The flutter occurs when a child-A form is loaded and visible while child-B form is loaded (child-B.ZOrder set to 0)
and placed on top of child-A. The flutter is the result which is that the focus goes between child-A and child-B indefinitely. The goal is to have the focus on child-B form, the top form only.

Collapse -

by Tony Hopkinson In reply to VB 6 forms flutter

Guesses from your description.
Have you got code in formactivate which is causing the focus switch or deity forfend formpaint.
P.S. Form 1 is loading 2 & 3 isn't it ? You haven't got 2 loading 3 using windows MDI (which is nasty horrible limited pig of thing by the way).

Collapse -

by ChuckSomerville In reply to VB 6 forms flutter

Is there code in your 3rd window's load event to somehow try to bring the 1st window back to the front? Perhaps that's done in such a way that it triggers form 1's load event? (Causing you to go through the cycle again)?

Collapse -

by bschaettle In reply to VB 6 forms flutter

I know this is an extreme kludge, but try writing to a log file every time a form gets the focus. You can start to track down what's causing the focus to shift from form to form.

Collapse -

by Tank252ca In reply to VB 6 forms flutter

Sounds like you have an infinite loop where the loading of child form B is triggering something in child form A. Have a look at the code in Activate, GotFocus, Initialize, Load and LostFocus events for the child forms. Is it possible that with setting the zorder of form B to 0, you have the zorder of both forms A and B being 0? Make sure that you change the zorder of both forms, or simply use the .visible and .setfocus properties for form B which will change the zorder automatically.

Collapse -

by martyconnelly In reply to VB 6 forms flutter

I don't know if this will help but there is a common problem with Access 2003 and WinXP on subforms with tab and label flicker.

You ain't gonna believe this but if running WinXP change your theme by right-clicking your Windows XP desktop, choosing Properties, and
setting the Theme to "Windows Classic".
If you cannot solve it then try deselecting Use Windows Themed Controls
on Forms under Tools | Options | Forms/Reports in Access 2003 the flickering or flutter goes away on my machine using Win XP Theme Classic and Access 2003 and by deselecting above option. The flickering is triggered by unattached labels on the page of a tab control. The workaround is to convert these labels to text boxes.
For non english speakers I found this by google searching on Screen
Flutter rather than Flicker.

For full explanation. and code to correct all forms if above tools option method doesn't work
http://members.iinet.net.au/~allenbrowne/ser-46.html

Back to Web Development Forum
9 total posts (Page 1 of 1)  

Related Discussions

Related Forums