View Full Version : is it possible "close and minimize" ?
ButtonMaker
12-22-2008, 02:38 AM
i was wondering if it was possible;
when user minimize the window it will send it to taskbar
http://img72.imageshack.us/img72/9932/28894965ej3.jpg
and
if user close the window it will send it to system tray ??
http://img516.imageshack.us/img516/7431/66484285wk7.jpg
like in the pictures
GoOgLe
12-22-2008, 09:04 AM
it is not possible...
jackdaniels
12-23-2008, 01:07 AM
not for sure but maybe possible with winapi plugin of Reteset...
ButtonMaker
08-19-2009, 08:47 AM
is there any dll or something else for that ?
Imagine Programming
08-19-2009, 09:06 AM
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.
ButtonMaker
08-19-2009, 10:29 AM
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...
Imagine Programming
08-19-2009, 11:05 AM
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
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
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
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.
ButtonMaker
08-19-2009, 11:11 AM
thanks Imagine Programming
but another question;
where would the codes be ? button click or page on show ?
Imagine Programming
08-19-2009, 11:14 AM
Global Functions
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
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
ButtonMaker
08-19-2009, 11:20 AM
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 !!!
Imagine Programming
08-19-2009, 11:22 AM
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.
ButtonMaker
08-19-2009, 11:26 AM
yes i did ... it is just start bar icon doesnt hide when i minimize it, it remains there
Imagine Programming
08-19-2009, 11:32 AM
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:p There's an event for that I believe.
I used this for a flat type window without a titlebar or borders:p
There must be a way for normal windows too...
Powered by vBulletin™ Version 4.0.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.