views:

50

answers:

1

We have an application written in VB.Net; there is a main window which hosts MDI child forms. When we are running the application on Windows Vista (in Win XP and 7 it works as it's supposed), we encounter a problem when closing MDI children forms. When we close the MDI window, its Closing event calls the WindowAnimate API to perform some animation, while the window is closing. The animation doesn't happen and the window itself technically is closed(there is no physical instance of that window exists), we still can see the just closed window on the screen (it seems that the screen area where the "closed" window was didn't get refreshed). When another MDI child form is created and then dragged over that area of the screen, the "closed" window gets finally "erased". The main culprit is the WindowAnimate API call:

AnimateWindow(Child.Handle, 150, AW_CENTER Or AW_HIDE)

When this line of code is commented out, the problem goes away, but of cource, there is no animation we need. All of the graphics drivers are up-to-date. Any help would be much appreciated.

A: 

We tried this code in a very simple test program and it doesn't seem to solve the problem we have. Have you tried that in Windows Vista?

Sean MacAvaney