Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2005
    Posts
    2

    Huh? [help] audio background and minimize

    Hello everybody, I got a problem I can't solve. How can I make the sound play again when I open back a menu after minimizing it? I'll try to explain myself better.
    In this menu I'm making I've put on a certain background sound that starts playing when you open the menu. Then, I added a button with the commands "audio.pause" and "Window.Minimize" (Application.GetWndHandle())
    So that when I push this button the audio pauses and the menu gets minimized into an icon on the bar. Now, I'd want to make possible that when I push on the icon to get the menu opened back into a regular window the background sound gets back playing, but I don't understand how to do this.
    I thought that logically it had to have something to do with putting something in the tab of the page properties, like in the sections "on show" or "on enter", but whatever I tried didn't seem to work. Can anybody help me to fix this, please?
    Thank you very much.

  2. #2
    Join Date
    Jun 2002
    Location
    Israel
    Posts
    1,843
    check this thread.
    http://www.indigorose.com/forums/sho...hlight=hotspot
    Hope it helps
    Yossi

  3. #3
    Join Date
    Aug 2003
    Location
    Maine, USA
    Posts
    1,695
    Another option, maybe set a variable and have it checked during the On Size event? I've never tried it, but I think in theory it would work.

  4. #4
    Join Date
    Apr 2006
    Location
    Madeira, Portugal
    Posts
    41
    I been trying to get my program to pause background audio on minimize and play background audio on restore.

    Now I added a system try menu that makes it work but I still have a couple problems with it.

    The main problem is when minimized audio is paused but when you double click the system tray icon the program is restored but audio stays paused.

    Another problem I'm having with program is I'm trying to make it disable minimize when restored & disable restore when minimized.

    Basically what I'm trying to do is have my menu work as the regular menu would but the regular menu only has Restore, Minimize and Quit and I'm planning on adding more items to it.

    Could someone help me with this plz

    Here is the following code I'm using in Global Functions:

    Code:
    function g_OnSystemTrayMenu(X, Y)
    tblMenu = {};
    tblMenu[1] ={};
    tblMenu[1].Text = "Restore";
    tblMenu[1].ID = 1;
    tblMenu[1].Checked = false;
    tblMenu[1].Enabled = true;
    tblMenu[2] ={};
    tblMenu[2].Text = "Minimize";
    tblMenu[2].ID = 2;
    tblMenu[2].Checked = false;
    tblMenu[2].Enabled = true;
    tblMenu[3] ={};
    tblMenu[3].Text = "Quit";
    tblMenu[3].ID = 3;
    tblMenu[3].Checked = false;
    tblMenu[3].Enabled = true;
    
    nTrayMenu = Application.ShowPopupMenu(X, Y, tblMenu, TPM_RIGHTALIGN, TPM_BOTTOMALIGN, true, false);
    
     if nTrayMenu == 1 then
    Audio.Play(CHANNEL_BACKGROUND);
    Application.Restore();
    
      end
      
      if nTrayMenu == 2 then
    Audio.Pause(CHANNEL_BACKGROUND);
    Application.Minimize();
    
    end
    
      if nTrayMenu == 3 then
    Application.Exit();
    end
    end
    Last edited by d3m0n1x; 04-26-2006 at 03:47 PM.

  5. #5
    Join Date
    Apr 2006
    Location
    Madeira, Portugal
    Posts
    41
    Only thing I could think of is changing the follwing code from:

    Code:
    if nTrayMenu == 1 then
    Audio.Play(CHANNEL_BACKGROUND);
    Application.Restore();
    end
      
      if nTrayMenu == 2 then
    Audio.Pause(CHANNEL_BACKGROUND);
    Application.Minimize();
    end
    to

    Code:
     if nTrayMenu == 1 then
    Audio.Play(CHANNEL_BACKGROUND);
    Window.Show(Application.GetWndHandle());
      end
    
      if nTrayMenu == 2 then
    Audio.Pause(CHANNEL_BACKGROUND);
    Window.Hide(Application.GetWndHandle());
    end
    Then when you double click on the try icon the program won't even show up. But I was wondering if there was a way that you could still double click on the tray icon, have the program show and background audio play again.
    Last edited by d3m0n1x; 04-26-2006 at 04:48 PM.

  6. #6
    Join Date
    Dec 2008
    Posts
    1

    Lightbulb

    I solved double-click:


    On 1 page - On mouse move
    Code:
    if i==0 then
    	jj = String.ToNumber(DLL.CallFunction(_SystemFolder.."\\User32.dll", "IsIconic", Application.GetWndHandle(), DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL))
    	if jj == 0 then
     		Audio.Play(CHANNEL_BACKGROUND);
     		i=i+1;
    	end
    end

    On minimalization button - On click
    Code:
    Window.Minimize(Application.GetWndHandle());
    Audio.Pause(CHANNEL_BACKGROUND);
    i=0;
    This code isnt nice but I work with this programm very short time. Thanks

Similar Threads

  1. Background Programs Tweaking
    By JasonWosak in forum AutoPlay Media Studio 4.0
    Replies: 0
    Last Post: 02-04-2003, 02:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts