Skip to Content
avatar image
-2
Former Member

Get screen resolution windows desktop

Hi,

I need get screen resolution of windows desktop. The object cl_gui_props_consumer not work correctly with taskbar..

Eg.

My current screen resolution of windows is 1366x768 With this eg.

DATA: lref_consumer TYPE REF TO cl_gui_props_consumer,
ls_metric_factors TYPE cntl_metric_factors.

lref_consumer = cl_gui_props_consumer=>create_consumer( ).
ls_metric_factors = lref_consumer->get_metric_factors( ).
WRITE: / ls_metric_factors-screen-x,
ls_metric_factors-screen-y.

Result: 1366x728

If taskbar is hide the result is correct 1366x768 Please i need a result independently the taskbar.

Anything happen to you?

Thank!!

Regards

Add comment
10|10000 characters needed characters exceeded

  • How exactly is the result affected by the task bar? I'm confused...

  • Supplying insufficient information is a good way of getting your question removed. Please supply specific details of what you're doing and why.

  • Former Member

    Sorry,

    My current screen resolution of windows is 1366x768 With this eg.

    DATA: lref_consumer TYPE REF TO cl_gui_props_consumer,
    ls_metric_factors TYPE cntl_metric_factors.

    lref_consumer = cl_gui_props_consumer=>create_consumer( ).
    ls_metric_factors = lref_consumer->get_metric_factors( ).
    WRITE: / ls_metric_factors-screen-x,
    ls_metric_factors-screen-y.

    Result: 1366x728

    If taskbar is hide the result is correct 1366x768 Please i need a result independently the taskbar.

    Thank

  • Get RSS Feed

2 Answers

  • Best Answer
    Apr 03, 2017 at 02:03 PM

    refer to windows forums; it's not an ABAP question.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 30, 2017 at 01:18 PM

    Ahh...

    You are not getting the screen resolution, you are getting the currrent window dimensions and the task bar you are talking about is the windows task bar yes ??

    I had to do this once but it's not on my work laptop. I'll check when I get home tonight.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks Richard,

      That's right, I'm talking about the windows taskbar.

      I have tried to get windos resolution by API, but I have not succeeded :(.

      Regards

      Diego