[Lazarus] Determine OS at runtime
Lee Jenkins
lee at datatrakpos.com
Tue Jan 27 21:10:33 CET 2009
Mattias Gaertner wrote:
> On Tue, 27 Jan 2009 13:01:04 -0500
> Lee Jenkins <lee at datatrakpos.com> wrote:
>
>> Dumb question:
>>
>> What is the best way to determine the OS platform at runtime?
>
> You can already at compile time.
>
> http://wiki.lazarus.freepascal.org/Code_Conversion_Guide#Useful_compiler_variables_.2F_defines_.2F_macros
>
Thanks Mattias. I was aware of the defines but thought maybe there was a
built-in function in LCL that returned an enumerated type or constant or
something similar.
No problem, I will just create a singleton that relies on the defines to return
an enumerated type of my own.
>> I would like to be able to position things like dialog form buttons
>> dependent on the OS.
>
> For common buttons you can use TButtonPanel.
Thanks I will look at this. Does this rearrange itself depending on the OS? Is
that what you are saying? I have not experience with this component.
Thanks again,
--
Warm Regards,
Lee
More information about the Lazarus
mailing list