Solved

Stop child flickering (MDI)

Posted on 2001-06-16
11
657 Views
Last Modified: 2006-11-17
I have an MDI-application with 3 loaded childs (maximized). When I want to show one of the other two childs it first appear as none-miximized then it maximizes and I get a very irritating delay in my program. How do I get rid of this flickering?

When I'm going to show an MDI child I use frmMdiChild1.zorder. Can I do it in an other way?
0
Comment
Question by:kpnkpn
  • 3
  • 3
  • 2
  • +2
11 Comments
 

Expert Comment

by:mufaza2000
ID: 6198122
The last Child you load will be on top.  The main thing to check, at least when I had that problem check you Child form properties to make sure that you don't have the windowstate set to how you want the default action of the Form to show up as.  If you have it set to maximize then it will Maximize when you show it, and then you have Windowstate set to normal in Code you will have that problem. So I would change the Windowstate to Maximized this helped me.  And also you might want to make sure that you are not showing the form to soon.  Maybe :

' Call to Child
Load cfrmChild
cfrmChild.Show

cfrmChild_Load Event:

' I have seen this show a form though
cfrmChild1.WindowState = vbMaximized

Hope it helps
0
 

Author Comment

by:kpnkpn
ID: 6198296
I have allready checked all the things you said. But I can't get rid of the window animation (from normal state to maximized). I have a listview at the left with three items. When I click on the first item i write: frmChild1.zorder. And then I get this irritating window animation.
0
 

Expert Comment

by:Askee
ID: 6198578
Why not this:

Maximise it when it's hidden then show it - he mdichild?
0
 

Expert Comment

by:Askee
ID: 6198579
Why not this:

Maximise it when it's hidden then show it - he mdichild?
0
 
LVL 15

Expert Comment

by:ameba
ID: 6198855
Set AutoShowChildren of your MDI form to False. Then you will be able to Load form without showing it:

   Load frmChild
   frmChild.WindowState = vbMaximized
   frmChild.Show

Please, do not accept this comment as answer if it is not for A grade.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 8

Expert Comment

by:glass_cookie
ID: 6199541
Hi!

How about this (assuming the mdichild is called Child)...

'Add this code to the MDIchild form:

Private Sub Form_Load()
Child.Move 0, 0, MDIForm1.Width, MDIForm1.Height
End Sub

'Add this code to your MDIForm:

Private Sub MDIForm_Load() 'You can change it - not necessarily MDIForm_Load
Load Child
Child.WindowState = vbMaximized
End Sub

That's it!

glass cookie : )
0
 
LVL 8

Expert Comment

by:glass_cookie
ID: 6199551
That's the best I could do to remove as much maximising animation as possible.
0
 

Author Comment

by:kpnkpn
ID: 6199621
Thankyou very much for the answers. I apologies for being indistinct. The problem isn't when I'm about to load the childs. It's when I have loaded 3 childs and want the 2nd to be shown. I then use zorder() and thats when I get the window animation.
0
 
LVL 15

Expert Comment

by:ameba
ID: 6199662
> I then use zorder() and thats when I get the window animation.

Well, don't use frm.Zorder, use frm.Show
0
 
LVL 15

Accepted Solution

by:
ameba earned 150 total points
ID: 6199664
frm.Show
frm.SetFocus
0
 

Author Comment

by:kpnkpn
ID: 6199734
Thanks... I didn't think about that.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now