I have Point of Sales application (Windows Form A) and a small form (Windows Form . On Windows startup, Form A and Form B will run automatically as both shortcut (Form A and Form are put inside startup Windows folder.
The problem is that Form B must always on top of others windows form. Sometime Form B is not on top of other windows form. I need to find a solution so that Form B always on top of other Windows forms, especially on top of Form A.
I try to create Autohotkey script (OPTION 1)
WinSet, AlwaysOnTop, ON, ahk_exe C:\Form B.exe
I compile the script and put the shortcut inside startup Windows folder. My assumption, it will work perfectly. Form A is starting up....Form B is starting up, then Form B is always on top by using above script.....
However...when Form A show confirmation message or any circumstances, Form B will not be on top (go to behind of other windows form). is this a bug of Autohotkey?
Then, I try to use OPTION 2 by writing this script: