Page 1 of 1
Detect OS name
Posted: Mon Oct 01, 2007 8:05 pm
by abc123
is there a way to detect the os name, some procedure like:
Code: Select all
if GetOSName() = "Windows XP"
MessageRequester("", "Your are using XP")
else
MessageRequester("", "Your are not using XP")
endif
Posted: Mon Oct 01, 2007 8:20 pm
by Num3
Posted: Mon Oct 01, 2007 9:12 pm
by abc123
OMG, how did i miss that
Thanks
Posted: Mon Oct 01, 2007 9:13 pm
by rsts
abc123 wrote:OMG, how did i miss that
Thanks
No disrespect, but are you aware there is a 'search' feature available for the forums?
cheers
Posted: Mon Oct 01, 2007 9:45 pm
by abc123
One more question, is there a way to position the save/open requesters to the middle of the parent window?
Did search but no luck
Posted: Mon Oct 01, 2007 9:49 pm
by milan1612
Take a look at
http://www.purearea.net/pb/CodeArchiv/R ... Preview.pb
You can position the dialog in the hook...
Posted: Mon Oct 01, 2007 10:27 pm
by PB
> is there a way to position the save/open requesters to the middle of the
> parent window?
> Did search but no luck
Search for "openfilerequester position" and you'll get what you want.
Re: Detect OS name
Posted: Tue Oct 02, 2007 12:14 pm
by Philippe-felixer76
abc123 wrote:is there a way to detect the os name, some procedure like:
Code: Select all
if GetOSName() = "Windows XP"
MessageRequester("", "Your are using XP")
else
MessageRequester("", "Your are not using XP")
endif
Good question, OSVersion is handy and gives one of the following:
#PB_OS_Windows_NT3_51
#PB_OS_Windows_95
#PB_OS_Windows_NT_4
#PB_OS_Windows_98
#PB_OS_Windows_ME
#PB_OS_Windows_2000
#PB_OS_Windows_XP
#PB_OS_Windows_Server_2003
#PB_OS_Windows_Future
But is only for windows, a command like getOSName() would
be very handy, and the info should be available on the system.
(See configuration screen->system)
Posted: Wed Oct 03, 2007 11:53 pm
by michaeled314
the PB compiler has the CompilerIf statement