pierre
04-26-2004, 05:51 AM
Hi all:
These codes can work on page properties, but I wish I have same function can work on Globals page. How can I do? Who can help I modifing these codes ASAP? Thank you for advance.
[OnShow]
blnPaused = false;
Audio.Load(CHANNEL_BACKGROUND, "AutoPlay\\Audio\\Track08-10.ogg", true, true);
Page.StartTimer(250);
[OnTimer]
hWnd = DLL.CallFunction(_SystemFolder .. "\\user32.dll", "GetForegroundWindow", "", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL)
if String.ToNumber(hWnd) ~= String.ToNumber(Application.GetWndHandle()) then
blnPaused=true;
Label.SetText("Label1", "Pause")
Audio.Pause(CHANNEL_BACKGROUND)
else
Label.SetText("Label1", "Play")
if blnPaused then
blnPaused = false;
Audio.Play(CHANNEL_BACKGROUND)
end
end
These codes can work on page properties, but I wish I have same function can work on Globals page. How can I do? Who can help I modifing these codes ASAP? Thank you for advance.
[OnShow]
blnPaused = false;
Audio.Load(CHANNEL_BACKGROUND, "AutoPlay\\Audio\\Track08-10.ogg", true, true);
Page.StartTimer(250);
[OnTimer]
hWnd = DLL.CallFunction(_SystemFolder .. "\\user32.dll", "GetForegroundWindow", "", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL)
if String.ToNumber(hWnd) ~= String.ToNumber(Application.GetWndHandle()) then
blnPaused=true;
Label.SetText("Label1", "Pause")
Audio.Pause(CHANNEL_BACKGROUND)
else
Label.SetText("Label1", "Play")
if blnPaused then
blnPaused = false;
Audio.Play(CHANNEL_BACKGROUND)
end
end