High priority window! |
Author: |
Message: |
Light86
Junior Member
Posts: 17
Joined: Apr 2007
|
O.P. High priority window!
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?
|
|
04-26-2007 09:22 PM |
|
|
Eljay
Elite Member
:O
Posts: 2949 Reputation: 77
– / / –
Joined: May 2004
|
RE: High priority window!
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...
|
|
04-26-2007 09:53 PM |
|
|
Light86
Junior Member
Posts: 17
Joined: Apr 2007
|
O.P. RE: High priority window!
Thx much!Just another thing...in xml how can I increase the size and the colour of the text?
|
|
04-27-2007 09:40 AM |
|
|
Volv
Skinning Contest Winner
Posts: 1233 Reputation: 31
35 / /
Joined: Oct 2004
|
|
04-27-2007 10:02 AM |
|
|
Light86
Junior Member
Posts: 17
Joined: Apr 2007
|
|
04-27-2007 10:37 AM |
|
|
Felu
Veteran Member
Posts: 2223 Reputation: 72
30 / /
Joined: Apr 2006
Status: Away
|
RE: High priority window!
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>
|
|
04-27-2007 01:31 PM |
|
|
Light86
Junior Member
Posts: 17
Joined: Apr 2007
|
O.P. RE: High priority window!
Thanks very much!
|
|
04-27-2007 02:26 PM |
|
|
Jimbo
Veteran Member
Posts: 1650 Reputation: 18
32 / /
Joined: Jul 2006
|
RE: High priority window!
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.
This post was edited on 04-27-2007 at 06:03 PM by Jimbo.
|
|
04-27-2007 06:00 PM |
|
|
vikke
Senior Member
Posts: 900 Reputation: 28
31 / /
Joined: May 2006
|
RE: High priority window!
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);
|
|
04-27-2007 07:06 PM |
|
|
Eljay
Elite Member
:O
Posts: 2949 Reputation: 77
– / / –
Joined: May 2004
|
RE: High priority window!
Or you could do it the proper way by passing the MB_TOPMOST flag to the MessageBox call.
* Eljay slaps vikke
code: var result = Interop.Call("User32.dll", "MessageBoxW", 0, "Your account has been disabled. Do you want more infomation?", "Error!", 16|4|0x40000);
|
|
04-27-2007 07:14 PM |
|
|
|