Scolring - Forum

Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology

Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered

You are not logged in.

#1 30-Oct-2014 14:55:28

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,477
Website

credMainwindow flashes when created and hidden

colleagues:

this may be a limitation of the vm as it exists at this point, or I could find a better way of doing this.
I want to create the player mainwindow as hidden, and become visible when os3d is fully initialized
this code manages to hide the window, while the user sees a screen that says "starting up 3d engine", however, when the window is created, it is visible to the user for a fraction of a second, enough to see the mainwindow flash before it's hidden

this is the code I  have written so far, as you can see, I'm trying everything to hide the window before os3d is initialized:

    set mainWindow = setEdWindowIcon (crEdMainWindow _channel nil ((sw / 2) - (iWinW / 2)) ((sh / 2) - (iWinH / 2)) iWinW iWinH nil strcatn "MediaOctopus3d Player : "::projname::nil) sWinPlayerMainIcon;
    _SHOWwindow mainWindow.EDW_win WINDOW_HIDDEN;
    _SETwindowStyle mainWindow.EDW_win WN_TOPMOST;
    setEdWindowVisible mainWindow 0;

I tried calling the DMSwin variable to hide that before the code above

_SHOWwindow DMSwin WINDOW_HIDDEN;
    set mainWindow = setEdWindowIcon (crEdMainWindow _channel nil ((sw / 2) - (iWinW / 2)) ((sh / 2) - (iWinH / 2)) iWinW iWinH nil strcatn "MediaOctopus3d Player : "::projname::nil) sWinPlayerMainIcon;
    _SHOWwindow mainWindow.EDW_win WINDOW_HIDDEN;
    _SETwindowStyle mainWindow.EDW_win WN_TOPMOST;
    setEdWindowVisible mainWindow 0;

it doesn't make a difference.

this may be a vm limitation at the moment, or perhaps there is another way I could handle things?

thx for your input.

Offline

#2 30-Oct-2014 15:28:27

iri
Admin. / Scol language & Scol apps developer
From: France
Registered: 22-Feb-2009
Posts: 2,024
Website

Re: credMainwindow flashes when created and hidden

When you create the window, add it the WN_HIDDEN flag

http://www.scolring.org/files/doc_html/_crwindow.html

In using WINDOW_HIDDEN in _SHOWwindow the window has been already created. Without hidden flag, it is shown and the _SHOWwindow function is called after.

Offline

#3 30-Oct-2014 15:35:30

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,477
Website

Re: credMainwindow flashes when created and hidden

iri wrote:

When you create the window, add it the WN_HIDDEN flag

http://www.scolring.org/files/doc_html/_crwindow.html

In using WINDOW_HIDDEN in _SHOWwindow the window has been already created. Without hidden flag, it is shown and the _SHOWwindow function is called after.

YES! That does it! Thx!  Here is the code:

set mainWindow = setEdWindowIcon (crEdMainWindow _channel nil ((sw / 2) - (iWinW / 2)) ((sh / 2) - (iWinH / 2)) iWinW iWinH WINDOW_HIDDEN strcatn "MediaOctopus3d Player : "::projname::nil) sWinPlayerMainIcon;

Offline

#4 31-Oct-2014 15:38:40

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,477
Website

Re: credMainwindow flashes when created and hidden

unfortunately the behavior appears on my win 8.1 tablet....so it must be the tablets gpu, although i welcome any suggestions to work around the flashing window problem.

Offline

#5 31-Oct-2014 15:43:24

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,089
Website

Re: credMainwindow flashes when created and hidden

Strange this is the same windows it should not be different.

Offline

#6 31-Oct-2014 18:27:27

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,477
Website

Re: credMainwindow flashes when created and hidden

arkeon wrote:

Strange this is the same windows it should not be different.

Alas, I can live with it.

Offline

#7 31-Oct-2014 21:13:00

iri
Admin. / Scol language & Scol apps developer
From: France
Registered: 22-Feb-2009
Posts: 2,024
Website

Re: credMainwindow flashes when created and hidden

you could add the WN_MINIMIZE flag with WN_HIDDEN ....

Offline

#8 31-Oct-2014 21:14:10

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,477
Website

Re: credMainwindow flashes when created and hidden

thx, I'll try that

Offline

#9 31-Oct-2014 21:18:30

iri
Admin. / Scol language & Scol apps developer
From: France
Registered: 22-Feb-2009
Posts: 2,024
Website

Re: credMainwindow flashes when created and hidden

With WN_MINIMIZE, you should add WN_RESTORE when you call _SHOWwindow

Offline

Board footer

Powered by FluxBB