Discussion:
Get Screen resolution Axapta 3
(too old to reply)
Erik Hansen
2010-02-08 09:30:01 UTC
Permalink
I have to choose wich form to start when an user log in, either the main menu
(use on a PC) or a custom form (use on a PDA).
I hope i can use the screen resolution but how do i get it?

My english i very bad, sorry.
Klaas Deforche
2010-02-08 10:31:01 UTC
Permalink
Hi Erik,

Maybe this wil work for you:

static void KlForgetMonitorResolution(Args _args)
{
System.Drawing.Size size;
System.String stringValue;
;

size = System.Windows.Forms.SystemInformation::get_PrimaryMonitorSize();

s = size.ToString();

info(s);
}

Best regards,
Klaas.
----------------
http://www.artofcreation.be
Post by Erik Hansen
I have to choose wich form to start when an user log in, either the main menu
(use on a PC) or a custom form (use on a PDA).
I hope i can use the screen resolution but how do i get it?
My english i very bad, sorry.
Klaas Deforche
2010-02-08 12:19:01 UTC
Permalink
Hi Erik,

Sorry, the suggested solution will only work in AX40 and AX2009.

Regards.
----------------
http://www.artofcreation.be
Post by Klaas Deforche
Hi Erik,
static void KlForgetMonitorResolution(Args _args)
{
System.Drawing.Size size;
System.String stringValue;
;
size = System.Windows.Forms.SystemInformation::get_PrimaryMonitorSize();
s = size.ToString();
info(s);
}
Best regards,
Klaas.
----------------
http://www.artofcreation.be
Post by Erik Hansen
I have to choose wich form to start when an user log in, either the main menu
(use on a PC) or a custom form (use on a PDA).
I hope i can use the screen resolution but how do i get it?
My english i very bad, sorry.
Ruslan Goncharov
2010-02-08 14:19:01 UTC
Permalink
Hi,

Try to run following job:

static void Job89(Args _args)
{
int hDC;

#define.HORZRES(8)
#define.VERTRES(10)
;

hDC = winApi::getWindowDC(infolog.hWnd());

info(strFmt('%1 %2',
winApi::getDeviceCaps(hDC, #HORZRES), winApi::getDeviceCaps(hDC,
#VERTRES)
));

winApi::releaseDC(infolog.hWnd(), hDC);
}
--
Ruslan Goncharov

http://rusgon.blogspot.com/
Post by Erik Hansen
I have to choose wich form to start when an user log in, either the main menu
(use on a PC) or a custom form (use on a PDA).
I hope i can use the screen resolution but how do i get it?
My english i very bad, sorry.
Erik Hansen
2010-08-13 09:05:03 UTC
Permalink
Hey

Sorry my late answer

Thanks for the reply

I forgot to tell that i have to use it for AX2009.
I use .net code because we mix 32 and 64 bit.

Thanks for helping me
Post by Ruslan Goncharov
Hi,
static void Job89(Args _args)
{
int hDC;
#define.HORZRES(8)
#define.VERTRES(10)
;
hDC = winApi::getWindowDC(infolog.hWnd());
info(strFmt('%1 %2',
winApi::getDeviceCaps(hDC, #HORZRES), winApi::getDeviceCaps(hDC,
#VERTRES)
));
winApi::releaseDC(infolog.hWnd(), hDC);
}
--
Ruslan Goncharov
http://rusgon.blogspot.com/
Post by Erik Hansen
I have to choose wich form to start when an user log in, either the main menu
(use on a PC) or a custom form (use on a PDA).
I hope i can use the screen resolution but how do i get it?
My english i very bad, sorry.
Loading...