Full screen transform from gui 1 to gui 2 smooth

Get help with using AutoHotkey and its commands and hotkeys
slovakia
Posts: 13
Joined: 12 Apr 2017, 09:33

Full screen transform from gui 1 to gui 2 smooth

24 Jun 2018, 21:12

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
imustbeamoron
Posts: 41
Joined: 18 Aug 2016, 22:56

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

24 Jun 2018, 21:42

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
slovakia
Posts: 13
Joined: 12 Apr 2017, 09:33

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

24 Jun 2018, 22:19

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.....
imustbeamoron
Posts: 41
Joined: 18 Aug 2016, 22:56

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

25 Jun 2018, 08:44

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.

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], eqv, Google [Bot], KilliK and 34 guests