What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Question] How to obtain screen resolution?

[Question] How to obtain screen resolution?
Author: Message:
xsylvain2
Junior Member
**

Avatar
MsgPlus! For Evermore

Posts: 17
49 / Male / –
Joined: Feb 2007
O.P. Grin  [Question] How to obtain screen resolution?
[Question] How to obtain screen resolution in JScrpt? ^o)

This post was edited on 03-14-2007 at 05:17 AM by xsylvain2.
03-13-2007 02:56 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [Question] How to obtain screen resolution?
code:
function OnEvent_Initialize(MessengerStart){
    /*
        Get the x and y widths of all monitors.
    */

   
    var _x = Interop.Call('user32', 'GetSystemMetrics', 0x4e /* SM_CXVIRTUALSCREEN */);
    var _y = Interop.Call('user32', 'GetSystemMetrics', 0x4f /* SM_CYVIRTUALSCREEN */);
   
    /*
        Print out the screen resolution
    */

    Debug.Trace(_x+'x'+_y);
}
03-13-2007 03:23 PM
Profile E-Mail PM Find Quote Report
xsylvain2
Junior Member
**

Avatar
MsgPlus! For Evermore

Posts: 17
49 / Male / –
Joined: Feb 2007
O.P. RE: [Question] How to obtain screen resolution?
Ok cool!!!

I try this and is work now. :S ok, I declared my variables at wrong place.

code:
function OnEvent_Initialize(MessengerStart){
var _x = Interop.Call('user32', 'GetSystemMetrics', 0x4e /* SM_CXVIRTUALSCREEN */);
var _y = Interop.Call('user32', 'GetSystemMetrics', 0x4f /* SM_CYVIRTUALSCREEN */);
var MerlinLeft_X   = 0 + Merlin.Width;           var MerlinTop_Y    = 0 + Merlin.Height;
var MerlinCenter_X = _x / 2 - Merlin.Width  / 2; var MerlinRight_X  = _x - Merlin.Width;
var MerlinCenter_Y = _y / 2 - Merlin.Height / 2; var MerlinBottom_Y = _y - Merlin.Height;

Is ok, I forgot to declare my variables at front of my script.

This post was edited on 03-14-2007 at 12:44 AM by xsylvain2.
03-13-2007 03:33 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [Question] How to obtain screen resolution?
Post your entire code and we can help.
03-13-2007 07:03 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On