Using VB6 Enterprise
Is there a simply way i.e an API call that can tell me what O/S my program at runtime is currently
running on?
Thanks
Adrian Harrison
Is there a simply way i.e an API call that can tell me what O/S my program at runtime is currently
running on?
Thanks
Adrian Harrison
> Is there a simply way i.e an API call that can tell me what O/S my program at runtime is currently
> running on?
> Thanks
> Adrian Harrison
Randy Johnston
program at runtime is currentlyQuote:>> Is there a simply way i.e an API call that can tell me what O/S my
Environ("OS") assumes you've set an environment variable called OS.Quote:>> running on?
>> Thanks
>> Adrian Harrison
>I use Environ("OS"). There may be better ways.
>Randy Johnston
I couldn't see it set on any PC's I looked at, so it's probably not standard
or default on all Windows PCs.
There are API's which return the info, but the *simplest* way in VB6 is to
use "Microsoft Sysinfo control 6.0" (goto Project, Components and select
this component (sysinfo.ocx)).
Then simply access the OSPlatform property of the control which will return
one of the following three values:
0 = Win32s
1 = Windows 95/98
2 = Windows NT
You can also access the version and build information of the operating
system (as well as things like battery power left etc.). This control is
really just a wrapper for the corresponding API calls (so it's arguably
overkill), but you did ask for the *simplest* method. 8)
Hope that helps,
Dougie Henderson
Public Sub GetSystemVersion()
'copy declarations from API viewer. OSVersion is a OSVERSIONINFO struct.
Dim ret As Long
'initialiseer struct
OSVersion.dwOSVersionInfoSize = Len(OSVersion)
'gegevens ophalen
ret = GetVersionEx(OSVersion)
'strippen overbodige gegevens: we hebben alleen low-order word nodig
OSVersion.dwBuildNumber = (OSVersion.dwBuildNumber And ((2 ^ 16) - 1))
End Sub
at runtime is currentlyQuote:>Using VB6 Enterprise
>Is there a simply way i.e an API call that can tell me what O/S my program
Quote:>running on?
>Thanks
>Adrian Harrison
1. HELP - Error 50003 - VB5, Win 95, Win 98, Win NT
Please HELP!
I have developed an application using VB5 EE SP3 on Win 95 and have updated
it using the same VB version on Win 98. The application is installed at a
client running Win 95 and NT.
When compiling under Win 95 and running executable at client site on an NT
machine, I receive a run-time error 50003 regarding the use of GIF files. I
don't use any GIF files or picture controls. I had a problem with a newer
version of the common dialog control - VB5 on W95 thought it was a picture
box - but I thought I had corrected that. I am also using Sheridan calendar
widgets v1.08 build 2.
Can someone help with this one??? I cannot reproduce the error on my W95 or
W98 machine. Also, I would like to be able to compile on my W98 machine
referencing the W95 version of the necessary controls. Any suggestions?
Thank you,
Tammy Crebo
2. JDBC Interface Using Large Objects
3. Win 2000 exe runs fine on 98 but crashes on 95 and NT
4. Eliminating control characters in RPL & Pick Basic source code?
5. Oracle Designer R2.1.2 for MS Win 95/98/NT
6. Hit 956 error when bring up informix Online Dynamic Server
7. Help: MS-DOS Screen Capture (in Full-Screen Mode) Under Win 95/98/NT
9. NT CONNECTS 95/98 BUT WON'T!?!?
10. Develope DB for clients computers running microsoft 95/98/NT
11. Problem: Developing on Win 98 and running on Win NT
13. Win 95 to win 98 Paradox 3