Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 13 of 13
  1. #1
    Join Date
    Mar 2007
    Posts
    172

    Grin is it possible "close and minimize" ?

    i was wondering if it was possible;
    when user minimize the window it will send it to taskbar

    and
    if user close the window it will send it to system tray ??


    like in the pictures

  2. #2
    Join Date
    Mar 2007
    Posts
    452
    it is not possible...

  3. #3
    Join Date
    Mar 2007
    Location
    HeaveN
    Posts
    534
    not for sure but maybe possible with winapi plugin of Reteset...

  4. #4
    Join Date
    Mar 2007
    Posts
    172

    Grin

    is there any dll or something else for that ?

  5. #5
    Join Date
    Apr 2007
    Location
    Raalte, OV, Netherlands
    Posts
    3,287
    Quote Originally Posted by ButtonMaker View Post
    is there any dll or something else for that ?
    Systray Action Plugin

    Unfortunate that dnet-software.com is offline, so downloading won't be happening lol.
    Bas Groothedde
    Imagine Programming :: Blog :: Familiar people here

    My AMS Plugins:

  6. #6
    Join Date
    Mar 2007
    Posts
    172
    thanks Imagine Programming

    but there is problem with this plugin i think !!!
    because if i click the main window after replacing icon to system tray then it brings the start bar icon back and also keeps system tray icon there...

  7. #7
    Join Date
    Apr 2007
    Location
    Raalte, OV, Netherlands
    Posts
    3,287
    Quote Originally Posted by ButtonMaker View Post
    thanks Imagine Programming

    but there is problem with this plugin i think !!!
    because if i click the main window after replacing icon to system tray then it brings the start bar icon back and also keeps system tray icon there...
    Try this in combination with the SysTray action plugin

    Code:
    function Window._Minimize(hWnd)
    	tbTrayIcon = SysTray.AddIcon("AutoPlay\\Icons\\icon.ico", "Tooltip", "SysTrayCallBack", "MenuCallBack");
    	if tbTrayIcon.Success then
    		Window.Hide(hWnd)
    	end
    end
    function Window._Restore(hWnd)
    	SysTray.RemoveIcon();
    	Window.Show(hWnd);
    end
    Change icon path.
    Now, when you call Window._Minimize(hWnd) it hides it from taskbar and shows it in systray, and when you double click the systray it reverses this.

    Example for the SysTrayCallBack and MenuCallBack functions

    Code:
    function SysTrayCallBack(numberID, stringButton)
    	if stringButton == "LeftClick" then
    		--------
    	elseif stringButton == "LeftDoubleClick" then
    		Window._Restore(Application.GetWndHandle());	
    	elseif stringButton == "RightClick" then
    		SysTray.ShowMenu(100);
    	elseif stringButton == "RightDoubleClick" then
    		------
    	end
    end
    function MenuCallBack(ItemID)
    	if(ItemID==102)then
    		Window._Restore(Application.GetWndHandle())
    	elseif(ItemID==103)then
    		Application.Exit(0);
    	end
    end
    and ofcourse the Menu Creation

    Code:
    RightClickMenu=SysTray.CreateImageMenu(100, false);
    
    if RightClickMenu.Success then
    	SysTray.MenuItem(102, "&Restore","AutoPlay\\Icons\\restore.ico");
    	SysTray.MenuBar();
    	SysTray.MenuItem(103, "&Exit","AutoPlay\\Icons\\close.ico");
    end
    Again, Change icon paths.
    Bas Groothedde
    Imagine Programming :: Blog :: Familiar people here

    My AMS Plugins:

  8. #8
    Join Date
    Mar 2007
    Posts
    172
    thanks Imagine Programming

    but another question;
    where would the codes be ? button click or page on show ?

  9. #9
    Join Date
    Apr 2007
    Location
    Raalte, OV, Netherlands
    Posts
    3,287
    Global Functions
    Code:
    function Window._Minimize(hWnd)
    	tbTrayIcon = SysTray.AddIcon("AutoPlay\\Icons\\icon.ico", "Tooltip", "SysTrayCallBack", "MenuCallBack");
    	if tbTrayIcon.Success then
    		Window.Hide(hWnd)
    	end
    end
    function Window._Restore(hWnd)
    	SysTray.RemoveIcon();
    	Window.Show(hWnd);
    end
    function SysTrayCallBack(numberID, stringButton)
    	if stringButton == "LeftClick" then
    		--------
    	elseif stringButton == "LeftDoubleClick" then
    		Window._Restore(Application.GetWndHandle());	
    	elseif stringButton == "RightClick" then
    		SysTray.ShowMenu(100);
    	elseif stringButton == "RightDoubleClick" then
    		------
    	end
    end
    function MenuCallBack(ItemID)
    	if(ItemID==102)then
    		Window._Restore(Application.GetWndHandle())
    	elseif(ItemID==103)then
    		Application.Exit(0);
    	end
    end
    On Show
    Code:
    RightClickMenu=SysTray.CreateImageMenu(100, false);
    
    if RightClickMenu.Success then
    	SysTray.MenuItem(102, "&Restore","AutoPlay\\Icons\\restore.ico");
    	SysTray.MenuBar();
    	SysTray.MenuItem(103, "&Exit","AutoPlay\\Icons\\close.ico");
    end
    Bas Groothedde
    Imagine Programming :: Blog :: Familiar people here

    My AMS Plugins:

  10. #10
    Join Date
    Mar 2007
    Posts
    172
    Code:
    function Window._Minimize(hWnd)
    	tbTrayIcon = SysTray.AddIcon("AutoPlay\\Icons\\icon.ico", "Tooltip", "SysTrayCallBack", "MenuCallBack");
    	if tbTrayIcon.Success then
    		Window.Hide(hWnd)
    	end
    end
    this doesnt remove start bar icon, it doesnt hide it !!!

  11. #11
    Join Date
    Apr 2007
    Location
    Raalte, OV, Netherlands
    Posts
    3,287
    Quote Originally Posted by ButtonMaker View Post
    Code:
    function Window._Minimize(hWnd)
    	tbTrayIcon = SysTray.AddIcon("AutoPlay\\Icons\\icon.ico", "Tooltip", "SysTrayCallBack", "MenuCallBack");
    	if tbTrayIcon.Success then
    		Window.Hide(hWnd)
    	end
    end
    this doesnt remove start bar icon, it doesnt hide it !!!
    Did you modify the iconpath so it refers to an existing icon? Because if the iconfile does not exist, tbTrayIcon.Success will not be true and Window.Hide won't be executed.
    Bas Groothedde
    Imagine Programming :: Blog :: Familiar people here

    My AMS Plugins:

  12. #12
    Join Date
    Mar 2007
    Posts
    172
    yes i did ... it is just start bar icon doesnt hide when i minimize it, it remains there

  13. #13
    Join Date
    Apr 2007
    Location
    Raalte, OV, Netherlands
    Posts
    3,287
    Quote Originally Posted by ButtonMaker View Post
    yes i did ... it is just start bar icon doesnt hide when i minimize it, it remains there
    Oh this is not working for the minimize button on the window you know There's an event for that I believe.

    I used this for a flat type window without a titlebar or borders
    There must be a way for normal windows too...
    Bas Groothedde
    Imagine Programming :: Blog :: Familiar people here

    My AMS Plugins:

Tags for this Thread

Posting Permissions

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