|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
My screen stays on backgroundI have a VB6 application running on windows XP SP1 (CPU : 900Mhz, RAM : 500 Mo). For one of the screens (let's call it "screen A"), when I click on a button to have access to the following screen B, it sometimes stays on screen A but the screen B is loaded and displayed on background. The screen A is on the front but is not active (the blue title bar is greyed). Due to this, I have to make ALT+TAB to display the screen B. I use the following code in the click event of the button in screen A : ScreenB.Show ScreenB.Refresh ScreenA.Hide (I don't want to unload screen A) After this code some other code is executed in the same procedure (to change the cursor from hourglass to arrow). I have added the command "ScreenB.Zorder" at the end but it does not solve the problem. This problem does not happen all the time. It happens especially when a lot of data has to be loaded in screenB, but even in this case, it sometimes works fine. When I run the application on a faster PC (3Ghz, 1Go RAM), I don't get this problem... Unfortunately, the application is inly used on the slower PC ! Thank you for your help ! "Fab" <F**@discussions.microsoft.com> wrote in message Can't reproduce that here, but then I don't know what other code you've got news:430F8C34-6E58-47F5-8251-DC4619711A99@microsoft.com... > For one of the screens (let's call it "screen A"), when I click on a > button > to have access to the following screen B, it sometimes stays on screen A > but the screen B is loaded and displayed on background. The screen A is > on the front but is not active (the blue title bar is greyed). Due to > this, I > have to make ALT+TAB to display the screen B. in the various events of FormA and what you have in FormB that might relate to FormA. Have you tried rearranging the order a little, such as: ScreenA.Hide DoEvents ScreenB.Show .. . . etc Mike |
|||||||||||||||||||||||