Page 1 of 4

How can I detect what OS version is running from?

Posted: Sun Mar 07, 2004 8:12 pm
by dagcrack
I need to detect if the OS that my appl is running from is WINXP or olders.. etc.. This is because some of the features will be different in code but same in function for the user, you know what I mean? some older OS' has problems with some code that works at newer OS'.. and vice versa..
how to detect?

Posted: Sun Mar 07, 2004 8:29 pm
by freak
Have a look at the OSVersion() command in the help file.

Timo

Posted: Sun Mar 07, 2004 8:41 pm
by dagcrack
Ahhh thx

I tryed:
Debug OSVersion()


And it showed: 60

???? I don't get it..


_
Running on winxp pro.

Posted: Sun Mar 07, 2004 8:49 pm
by GPI
RTFM!












(Because i think, you dont understand: Read the fucking manual)

Posted: Sun Mar 07, 2004 8:56 pm
by merendo
*lol*, hehe!

Looks like you are a noob, dagcrack. Seriously, reading the manual helps. You can also take a look at some tutorials available at http://www.reelmediaproductions.com/pb.

Greetz!

Posted: Sun Mar 07, 2004 9:01 pm
by dagcrack
I didnt had time for reading it... and dont call me noob cause you'll know how noob I am jeez. :evil:

Posted: Sun Mar 07, 2004 9:03 pm
by thefool
newbie is better. I also ask some pretty stupid questions myself :)
Welocme.

Posted: Sun Mar 07, 2004 9:03 pm
by DriakTravo
Let us embrace the newbs and teach them. After all, we were all newbs at one point. :)

Posted: Sun Mar 07, 2004 9:07 pm
by thefool
can i ask a pretty stupid question?

When debug osversion() says 60, is it just the number of the constant or
what it returns? I know how to use it via the "IF" or via "Select case" or something else.

Posted: Sun Mar 07, 2004 9:20 pm
by merendo

Code: Select all

Debug #PB_OS_Windows_XP
Debug OSVersion()
If your Os is not WinXP, change it to the according constant.

@degrack: Sorry for noob, of course i meant newbie or 'unexperienced user'. You're right, noob is the wrong word.

Posted: Sun Mar 07, 2004 9:24 pm
by DriakTravo
Here, mabe this will help:

Code: Select all

Procedure.l GetOSVersion()
  ;If this procedure retruns 1, then the os is - Windows NT3 51
  ;If this procedure retruns 2, then the os is - Windows 95
  ;If this procedure retruns 3, then the os is - Windows NT 4
  ;If this procedure retruns 4, then the os is - Windows 98
  ;If this procedure retruns 5, then the os is - Windows ME
  ;If this procedure retruns 6, then the os is - Windows 2000
  ;If this procedure retruns 7, then the os is - Windows XP
  ;If this procedure retruns 8, then the os is - Windows Future
  If OSVersion() = #PB_OS_Windows_NT3_51
    ProcedureReturn 1
  ElseIf OSVersion() = #PB_OS_Windows_95
    ProcedureReturn 2
  ElseIf OSVersion() = #PB_OS_Windows_NT_4
    ProcedureReturn 3
  ElseIf OSVersion() = #PB_OS_Windows_98
    ProcedureReturn 4
  ElseIf OSVersion() = #PB_OS_Windows_ME
    ProcedureReturn 5
  ElseIf OSVersion() = #PB_OS_Windows_2000
    ProcedureReturn 6
  ElseIf OSVersion() = #PB_OS_Windows_XP
    ProcedureReturn 7
  ElseIf OSVersion() = #PB_OS_Windows_Future
    ProcedureReturn 8
  EndIf
EndProcedure

Posted: Sun Mar 07, 2004 9:31 pm
by thefool
thanks

Posted: Sun Mar 07, 2004 9:58 pm
by dagcrack
@ merendo
I'm not DEGCRACK, at least try to write my nick as it is :D as I did (emh... Ctrl C Ctrl V :P)

I am just new at this forum.
About PB I started a month ago I call my self a beginner at it.

Dont think that you're the best one... cause you'll end knowing you're no one. (hey I heard that phrase somewhere..)

Don't talk for the others please. :x

@GPI
Why you had to say badwords just for that? :(



Hey well I liked this forum, my name is Gus I'm 17. I have some knowladge of VB B+ B3D and now learning PB. And... I will never call my self an ace guy... and plus.. I will never say "you're a noob!!" cause that's the sad part... shows how lame you are sometimes... well anyway I gotta go, I'm busy at work so we talk later.. BTW.. I did read that part of the manual already :lol: :!:

Hey is there any thread where you guys shows your desktops (real ones.. desks.. your job environment ? ) cause its a funny idea to know how you work.

Posted: Sun Mar 07, 2004 10:28 pm
by Dare2
Howdy dagcrack,

Seems you got a rather warm-ish welcome from some. :)

Welcome aboard.

Posted: Mon Mar 08, 2004 12:04 am
by Kale
I didnt had time for reading it
C'mon man you've got to help yourself too! otherwise how will you learn?