Shoutbox

window close button - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: window close button (/showthread.php?tid=81591)

window close button by zogo on 02-11-2008 at 01:41 PM

can you script a window without a close button but can be closed by different code and if so what are the codes??????


RE: window close button by mynetx on 02-11-2008 at 02:07 PM

Well, basically you can hide a Plus window's close button by using code like this:

code:
<Window Id="WndSomeWindow" Version="1">
    <TitleBar>
        <AllowClose>false</AllowClose>
    </TitleBar>
    ...
</Window>
This will hide the [Image: 214126d.png] sign.

However, you can always use scripted code to close the window, like this:
code:
var wndSomeWindow = MsgPlus.CreateWnd("Resources\\wndSomeWindow.xml", "WndSomeWindow");
// do other stuff
// ...
// now we decide it's time to close the window
wndSomeWindow.Close(1);
However, the user can always close the window by pressing Alt+F4 (unless you register a message notification callback function and suppress the window message this way).
RE: window close button by zogo on 02-11-2008 at 02:11 PM

thanks for your help


RE: window close button by Spunky on 02-11-2008 at 04:33 PM

You can also close PlusWnds using the Esc button and by setting a seperate button with the Id "BtnCancel" (although I doubt the latter is what you are after)