Shoutbox

High priority window! - 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: High priority window! (/showthread.php?tid=73944)

High priority window! by Light86 on 04-26-2007 at 09:22 PM

Hello again,this time 1 have a really easy couple of question!:)
First of all..1 made a script which makes appear a window when user logs in,but this window is supparsed by the other msn windows,how could 1 make it stay always in the center of the screen?


RE: High priority window! by Eljay on 04-26-2007 at 09:53 PM

You can make the window stay on top of other windows by specifying the TopMost attribute in the window's XML.
Example:

code:
<Window Id="...">
  <Attributes>
    <TopMost>true</TopMost>
  </Attributes>
  ...
</Window>

And by default it should appear in the center of the screen but to make it not movable you can disable the LockOnClick attribute.

code:
<Window Id="...">
  <Attributes>
    <TopMost>true</TopMost>
    <LockOnClick>false</LockOnClick>
  </Attributes>
</Window>

Can't test this at the moment but it should work...
RE: High priority window! by Light86 on 04-27-2007 at 09:40 AM

Thx much!Just another thing...in xml how can I increase the size and the colour of the text?


RE: High priority window! by Volv on 04-27-2007 at 10:02 AM

quote:
Originally posted by Light86
Thx much!Just another thing...in xml how can I increase the size and the colour of the text?
Scripting Documentation - Interface Windows Schema Documentation
RE: RE: High priority window! by Light86 on 04-27-2007 at 10:37 AM

quote:
Originally posted by Volv
quote:
Originally posted by Light86
Thx much!Just another thing...in xml how can I increase the size and the colour of the text?
Scripting Documentation - Interface Windows Schema Documentation


Can't understand anythyng^o)
RE: High priority window! by Felu on 04-27-2007 at 01:31 PM

Use a RichStaticControl for colored text. Plus! formatting codes can be used for color and other effects.
For font size-

code:
<Control xsi:type="RichStaticControl" Id="Txt">
  <Position .... />
  <Font>
    <Size>12</Size>
  </Font>
  <Caption>[c=blue]This will be blue colored[/c]</Caption>
  </Control>


RE: High priority window! by Light86 on 04-27-2007 at 02:26 PM

Thanks very much!:D


RE: High priority window! by Jimbo on 04-27-2007 at 06:00 PM

How would i make a window like

code:
var result = Interop.Call("User32.dll", "MessageBoxW", 0, "Your account has been disabled. Do you want more infomation?", "Error!", 16+4);

always stay in the centre and on top of the screen until a button is pressed.
RE: High priority window! by vikke on 04-27-2007 at 07:06 PM

You can probably do in this ugly way:

code:
var result = Interop.Call("User32.dll", "MessageBoxW", 0, "Your account has been disabled. Do you want more infomation?", "Error!", 16+4);
// Get window handle to MessageBox
var hMessageBox = Interop.Call("User32.dll", "GetForegroundWindow");
// Apply TopMost
Interop.Call("User32.dll", "SetWindowPos", Handle, -1, 0, 0, 0, 0,19);


RE: High priority window! by Eljay on 04-27-2007 at 07:14 PM

Or you could do it the proper way by passing the MB_TOPMOST flag to the MessageBox call.
* Eljay slaps vikke :P

code:
var result = Interop.Call("User32.dll", "MessageBoxW", 0, "Your account has been disabled. Do you want more infomation?", "Error!", 16|4|0x40000);