Page 1 of 1

Full screen transform from gui 1 to gui 2 smooth

Posted: 24 Jun 2018, 21:12
by slovakia
Please help me
I want to transform from gui 1 to gui 2 by press F2. But i don't know how to do it directly. I don't want 1 second show my desktop before gui 2 show.

Code: Select all

Gui 1:Default
Gui,+AlwaysOnTop
Gui, Add,Picture, w%A_ScreenWidth% h%A_ScreenHeight% vPicture, bg0.png
Gui, Show,w%A_ScreenWidth% h%A_ScreenHeight%
Gui, -Caption
return
F2::
gui,destroy
Gui,+AlwaysOnTop
Gui, Add, Picture, w%A_ScreenWidth% h%A_ScreenHeight% , bg1.png
Gui Show,  w%A_ScreenWidth% h%A_ScreenHeight%, home
Gui, Add, Text, x6 y110 w70 h100 BackGroundTrans +Center,
Gui Font, S30 ,Arial 
Gui Add, Text, cwhite  w1260 h60 BackGroundTrans +Center, HELLO WORD
Gui Add, Edit, vsotien gtest hWndhEdit1 w1260 h60 BackGroundTrans +Center, 
Gui Font, S30
Gui Add, Edit, cwhite   w1260 h60 hWndhEdit2 BackGroundTrans +Center ,
Gui Add, Edit, cwhite   w1260 h60 vsotienbangchu hWndhEdit3 BackGroundTrans +Center,
Gui Add, Text, cwhite   w1260 h60  BackGroundTrans +Center, 
Gui, -Caption
return
ESC::
ExitApp

Re: Full screen transform from gui 1 to gui 2 smooth

Posted: 24 Jun 2018, 21:42
by imustbeamoron
build your 2nd gui ahead of time, and just dont show it until its needed...

Code: Select all

gosub, build_gui2

Gui,1: Default
Gui,1: +AlwaysOnTop
Gui,1: Add,Picture, w%A_ScreenWidth% h%A_ScreenHeight% vPicture, bg0.png
Gui,1: -Caption
Gui, 1: Show,w%A_ScreenWidth% h%A_ScreenHeight%
return

F2::
Gui,2: Show,  w%A_ScreenWidth% h%A_ScreenHeight%, home
gui,1: destroy
return

build_gui2:
Gui,2: +AlwaysOnTop
Gui,2: Add, Picture, w%A_ScreenWidth% h%A_ScreenHeight% , bg1.png
Gui,2: Add, Text, x6 y110 w70 h100 BackGroundTrans +Center,
Gui,2: Font, S30 ,Arial 
Gui,2: Add, Text, cwhite  w1260 h60 BackGroundTrans +Center, HELLO WORD
Gui,2: Add, Edit, vsotien hWndhEdit1 w1260 h60 BackGroundTrans +Center, 
Gui,2: Font, S30
Gui,2: Add, Edit, cwhite   w1260 h60 hWndhEdit2 BackGroundTrans +Center ,
Gui,2: Add, Edit, cwhite   w1260 h60 vsotienbangchu hWndhEdit3 BackGroundTrans +Center,
Gui,2: Add, Text, cwhite   w1260 h60  BackGroundTrans +Center, 
Gui,2: -Caption
return

ESC::
ExitApp

Re: Full screen transform from gui 1 to gui 2 smooth

Posted: 24 Jun 2018, 22:19
by slovakia
imustbeamoron wrote:build your 2nd gui ahead of time, and just dont show it until its needed...

Code: Select all

gosub, build_gui2

Gui,1: Default
Gui,1: +AlwaysOnTop
Gui,1: Add,Picture, w%A_ScreenWidth% h%A_ScreenHeight% vPicture, bg0.png
Gui,1: -Caption
Gui, 1: Show,w%A_ScreenWidth% h%A_ScreenHeight%
return

F2::
Gui,2: Show,  w%A_ScreenWidth% h%A_ScreenHeight%, home
gui,1: destroy
return

build_gui2:
Gui,2: +AlwaysOnTop
Gui,2: Add, Picture, w%A_ScreenWidth% h%A_ScreenHeight% , bg1.png
Gui,2: Add, Text, x6 y110 w70 h100 BackGroundTrans +Center,
Gui,2: Font, S30 ,Arial 
Gui,2: Add, Text, cwhite  w1260 h60 BackGroundTrans +Center, HELLO WORD
Gui,2: Add, Edit, vsotien hWndhEdit1 w1260 h60 BackGroundTrans +Center, 
Gui,2: Font, S30
Gui,2: Add, Edit, cwhite   w1260 h60 hWndhEdit2 BackGroundTrans +Center ,
Gui,2: Add, Edit, cwhite   w1260 h60 vsotienbangchu hWndhEdit3 BackGroundTrans +Center,
Gui,2: Add, Text, cwhite   w1260 h60  BackGroundTrans +Center, 
Gui,2: -Caption
return

ESC::
ExitApp
Thank you. But i have more than 2 gui and many time switch from gui 1,2,3.....

Re: Full screen transform from gui 1 to gui 2 smooth

Posted: 25 Jun 2018, 08:44
by imustbeamoron
dont destroy your guis until you are completely done with them. hide them if you need to, but you should only create each gui one time.