I have a program that can use different data , graphics, etc nad I want 1 version to run in 3 different configurations.
So I have copied the whole directory 3 times renamed the application differently and setup the config and data files graphics etc to be different for each directory.
I created a little launcher program with 3 buttons that have a button like
Code: Select all
on mouseUp launch "C:\Users\xxxx\Documents\multi\nameXXX\progxxx.exe" end mouseUp
I already had a on relaunch handler in the main stack that just beeped to stopp people running multiple copies of the original.
My problem is if I set systemwindow to true on relaunch you would expect the window to come to the top but it doesn't. The first time each application is run it does show at the top but pressing the launcher with
has no effect.set the systemwindow of me to true
I can think of a "simple" way but I woulkd like to do it the obvious way.
The simple way is putting "the launcheR button in the app - but that means a lot of real estate movement.
Here is how I used to do it in Foxpro - if anybody can show me how to "wrap" this with infinite livecode on windows with a C interface i then have a good reason to make a move to version 8 - at least for the launcher which will be three times the size of the main app - go figure.
editLOCAL lcWinName, lnHWnd
lcWinName = "Your window title name"
DECLARE INTEGER BringWindowToTop IN WIN32API LONG HWND
DECLARE INTEGER ShowWindow IN WIN32API LONG HWND, LONG nCmdShow
DECLARE INTEGER FindWindow IN WIN32API STRING, STRING
lnHWnd = FindWindow(0, m.lcWinName)
IF m.lnHWnd <> 0
to further explain - we could call these routine like this
and there were other calls we could "bind" like
DECLARE INTEGER GetForegroundWindow IN user32 - so you could see which window was in the foreground . - simples.
Any help/ideas/cake welcome.
KIndest Regards Lagi