PDA

View Full Version : screen not opening on top



fafromrefuge
07-10-2009, 01:38 AM
I have a problem running out for quite sometime now.
When i start the updater . it works in the background and then if an update is found, opens a screen with the changelog.
My problem is that the screen doesnt open on top and so my users doesnt see it.
Without any modification i think i was the normal behaviour as the user switched to another process. But then i added this line just before calling "show" on my screen:
Window.SetOrder(Application.GetWndHandle(), HWND_TOP);

I even tried to add it to the preload action of the screen.
Sadly it doesnt always work(mostly never works).
I would really need help with this as my users complain about that.

Any idea?

Thanks

jassing
07-10-2009, 05:09 AM
can you post a small sample to replicate the issue for us?

fafromrefuge
07-10-2009, 07:32 AM
this is a sample of the server script i use:

if (s_SilentMode) then
TrueUpdate.WriteToLogFile("ready to download file\n");
downloadUpdate();
Application.Restore();
Screen.Show("ready to install");
launchInstaller();
else
Window.SetOrder(Application.GetWndHandle(), HWND_TOP);
Screen.Show("action screen");

if(Screen.Show("Download Patch") == SR_SUCCESS) then

Window.SetOrder(Application.GetWndHandle(), HWND_TOP);
Screen.Show("ready to install");
launchInstaller();
end
end
But the setOrder doesnt seem to work. Maybe it is because i do it just before the show. But i have nowhere else to put it :s

Just so you know the "action screen" is a scrolling HTML so i dont have a on start.

Thanks for your quick reply

jassing
07-10-2009, 07:38 AM
Try setting the "win on top" in the Preload of the screen; failing that; try this more complicated idea:

1) On preload -- start a timer, say 1/2 second
2) In On Ctrl message -- if timer fired, stop timer & set window on top

fafromrefuge
07-10-2009, 08:33 AM
i already tried the preload, didnt work
I ll try the timer

Thanks

fafromrefuge
07-21-2009, 08:42 AM
i tried the timer and it doesnt work.
I also find the exact situation when it doesnt work.
1- launch the updater
2 -give the focus to another application before the screen is shown
3 - when the screen appears it appears behind the current application

I suppose it has something to do with the way you put the window on top.

does it helps?

fafromrefuge
07-29-2009, 07:59 AM
I am sorry to bump this thread. But for us this is a deal breaker.

We need to be able to make a screen appear on top in every situation.
Currently our users reports that they dont see the screen saying that an update is available, and this is really bad!

Tobe sure we understand each other, we dont want the updater to be ALWAYS on top, we want screen to appear on top and let the possibility to the user to let the screen open in the background.

Please answer me, we need a solution.

jassing
07-29-2009, 10:04 AM
AutoIt has a lot of window handling capabilities; perhaps you could write a small file that is run from TU that waits for the screen to appear and brings it to the front.

fafromrefuge
07-30-2009, 08:45 AM
I can look at it.

But to be true i hate that solution because that means installing another exe on the user's computer.

jassing
07-30-2009, 08:52 AM
True it is not an ideal solution, indeed, it is a work around.
But one cannot expect IR to instantly pop out a fix (IF they even consider it a bug...) when they have schedules & several other applications to support; thus, enter the work around. Hopefully they will find it to be a bug & put it on the list for the next release cycle.

To be sure they get it; best to issue a support ticket, as the regular forums are mostly user-to-user with the crew @ IR chiming in occasionally...

Good luck.
-j

fafromrefuge
07-30-2009, 10:12 AM
I tested it woks. At least i have a work around.
And you are right!

I will post a ticket

Thanks