Recent

Author Topic: getmaxx & getmaxy in Lazarus  (Read 1584 times)

oproescu

  • New Member
  • *
  • Posts: 48
getmaxx & getmaxy in Lazarus
« on: November 01, 2019, 03:28:23 pm »
Are there getmaxx and getmaxy functions in Lazarus? How are they used?
Thanks,
Oproescu

julkas

  • Guest

jamie

  • Hero Member
  • *****
  • Posts: 6134
Re: getmaxx & getmaxy in Lazarus
« Reply #2 on: November 01, 2019, 11:52:58 pm »
Excuse me for being stupid but what exactly does GetMAXX and Y pertain to

 I picture a lot of different possibilities ?
The only true wisdom is knowing you know nothing

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: getmaxx & getmaxy in Lazarus
« Reply #3 on: November 02, 2019, 12:16:14 am »
Returns in Turbo Pascal unit Graph the maximum screen resolution.

Bart

  • Hero Member
  • *****
  • Posts: 5290
    • Bart en Mariska's Webstek
Re: getmaxx & getmaxy in Lazarus
« Reply #4 on: November 02, 2019, 12:16:18 am »
Excuse me for being stupid but what exactly does GetMAXX and Y pertain to

You can check that out for yourself:

Check this - https://www.freepascal.org/docs-html/current/rtl/graph/funcscreen.html

Bart

jamie

  • Hero Member
  • *****
  • Posts: 6134
Re: getmaxx & getmaxy in Lazarus
« Reply #5 on: November 02, 2019, 12:19:01 am »
Ok, I generally use SCREEN.... for that info.

 That is, if we are talking about GUI desktops

 Ok, So it looks like console mode..

That would clear things up, we need to specify these things. :)
« Last Edit: November 02, 2019, 12:20:35 am by jamie »
The only true wisdom is knowing you know nothing

oproescu

  • New Member
  • *
  • Posts: 48
Re: getmaxx & getmaxy in Lazarus
« Reply #6 on: November 02, 2019, 09:38:59 am »
Thanks julkas!
I researched https://www.freepascal.org/docs-html/current/rtl/graph/funcscreen.html and it appears that I knew this function from Pascal, but in Lazarus it generates the error: Identifier not found "getmaxx". Same with getmaxy.
How else can I find in Lazarus the maximum screen resolution?

Thaddy

  • Hero Member
  • *****
  • Posts: 14393
  • Sensorship about opinions does not belong here.
Re: getmaxx & getmaxy in Lazarus
« Reply #7 on: November 02, 2019, 09:57:20 am »
As Jamie wrote, use Screen, which is a global instance of TScreen which encapsulates everything there is to know about the scree for GUI apps.
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

Hartmut

  • Hero Member
  • *****
  • Posts: 751
Re: getmaxx & getmaxy in Lazarus
« Reply #8 on: November 02, 2019, 10:05:55 am »
GetMaxX and GetMaxY belong to Unit Graph, as shown in the upper right corner of https://www.freepascal.org/docs-html/current/rtl/graph/funcscreen.html. Before you can use them, you must initialize the Graphic Mode via procedure InitGraph.
But I would use old unit Graph only in a console program. In a GUI program I would ask variable 'Screen' which belongs to Unit Forms.

julkas

  • Guest
Re: getmaxx & getmaxy in Lazarus
« Reply #9 on: November 02, 2019, 11:11:12 am »
GetMaxX and GetMaxY belong to Unit Graph, as shown in the upper right corner of https://www.freepascal.org/docs-html/current/rtl/graph/funcscreen.html. Before you can use them, you must initialize the Graphic Mode via procedure InitGraph.
But I would use old unit Graph only in a console program. In a GUI program I would ask variable 'Screen' which belongs to Unit Forms.
Yes, Graph unit gives BP/TP compatibility.
https://forum.lazarus.freepascal.org/index.php/topic,46896.0.html
I switched to PTCGRAPH unit.
Another *GRAPH unit - http://math.ubbcluj.ro/~sberinde/wingraph/.

Thaddy

  • Hero Member
  • *****
  • Posts: 14393
  • Sensorship about opinions does not belong here.
Re: getmaxx & getmaxy in Lazarus
« Reply #10 on: November 02, 2019, 11:58:16 am »
Yes, Graph unit gives BP/TP compatibility.
The standard graph package already contains several different user sourcecode compatible implementations:
graph, ptcgraph, wingraph and sdlgraph, for example are all included.
To use one or the others, simply change uses clause....
« Last Edit: November 02, 2019, 12:00:16 pm by Thaddy »
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

 

TinyPortal © 2005-2018