xml window position - 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: xml window position (/showthread.php?tid=77102) xml window position by scutterman on 08-29-2007 at 07:35 PM
How can I change the position of an xml window on the screen. RE: xml window position by matty on 08-29-2007 at 07:50 PM When Creating the Window using MsgPlus.CreateWnd the 3rd parameter if you set it to 1 will cause the window to not show on the screen. What you can do with this is then use the MoveWindow api to move it where you want to then call the ShowWindow api to show it. Other then that there is nothing in the XML that will allow you to set positions. RE: xml window position by scutterman on 08-29-2007 at 07:53 PM
Thanks, I'll look into MoveWindow() RE: xml window position by markee on 08-29-2007 at 11:27 PM You can move it while the window is visable, but if you are moving it initially then it looks better if you don't display the window until it is in the position that you were initially wanting. RE: xml window position by scutterman on 08-30-2007 at 08:58 AM Ok, thanks for all of your help RE: xml window position by scutterman on 08-30-2007 at 09:37 AM
ok, I've tried MoveWindow() but I can't seem to get it to work. If I have the last parameter in quotes, or left out I get an "object expected" error but if I have it out of quotes it comes up with "'FALSE' is undefined". Can someone give me an example MPL script please? code: Thanks ~~Scutterman~~ RE: xml window position by Spunky on 08-30-2007 at 10:17 AM change FALSE to false or replace it with a 0 (zero) RE: xml window position by scutterman on 08-30-2007 at 11:26 AM
Thanks RE: xml window position by scutterman on 08-30-2007 at 11:34 AM
GRRRRRRRRRRRRR RE: xml window position by Matti on 08-30-2007 at 12:19 PM
MoveWindow is a Win32 API function in user32.dll. You should use Interop.Call(DllName, FunctionName, Param1, ...) to call it! code:The result of MoveWindow is zero if it failed. So, if you want to check if it failed, use if(Result == 0) ... and do whatever you want. (show error box, tell the debugger something, ...) Of course, it's not needed that you place all these comments in your function call. It's just to let you know what each parameter stands for. Something like this can be used if you don't need all these comments: code:But I think you could've figured that out yourself too. quote:Sorry, but that won't make any difference. FALSE is false. And false as parameter in an Interop.Call equals 0 too, the documentation explains: quote: RE: xml window position by scutterman on 08-30-2007 at 06:39 PM
Thanks, the MoveWindow is returning a value of 1 now and the ShowWindow is returning a value of 0. The window isn't showing up but I'm sure it's just a bug in my code code: ~~Scutterman~~ RE: xml window position by matty on 08-30-2007 at 07:01 PM
quote: SW_SHOW is not a string value it is an integer. Easiest way to find out what the values are is to google the following define SW_SHOW SW_SHOW's value is 5. RE: xml window position by markee on 08-31-2007 at 12:15 AM
quote:Why use a DLL at all when Patchou has supplies us with a read/write property to do it? code:And then magically it ill appear. Make sure you change PlusWndObject to what the object actually is RE: xml window position by scutterman on 09-02-2007 at 01:38 PM
Thanks to everyone, the window is displaying fine now |