Visualizzazione dei risultati da 1 a 5 su 5
  1. #1
    Utente di HTML.it
    Registrato dal
    May 2002
    Messaggi
    286

    [vb6] Sistema operativo in uso

    Come faccio a sapere qual'è il sitema operativo in uso sulla macchina su cui voglio eseguire il mio programma?
    Grazie!!!

  2. #2
    windows, non puo essere un alro
    Pa brire je mbret, pa brire je pasha, pa brire eshte dhe moda...

  3. #3
    Utente di HTML.it
    Registrato dal
    May 2002
    Messaggi
    286
    Scusate :adhone:
    Volevo dire:
    Quale VERSIONE di Windows è installata?

  4. #4
    Puoi usare il controllo

    Microsof Sys Info

  5. #5
    Utente di HTML.it L'avatar di yyzyyz
    Registrato dal
    Oct 2001
    Messaggi
    1,653
    nel tuo programma dovresti inserire un routine ke controll i ke os gira sul pc, questo prima ke la tua appz parta.

    potresti fare cosi :

    codice:
    Private Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" _
        (lpVersionInformation As OSVersionInfo) As Long
    Const VER_PLATFORM_WIN32s = 0
    Const VER_PLATFORM_WIN32_WINDOWS = 1
    Const VER_PLATFORM_WIN32_NT = 2
    Private Type OSVersionInfo
        OSVSize As Long
        dwVerMajor As Long
        dwVerMinor As Long
        dwBuildNumber As Long
        PlatformID As Long
        szCSDVersion As String * 128
    End Type
    Function GetOSVer() As String
        Dim osv As OSVersionInfo
        osv.OSVSize = Len(osv)
        If GetVersionEx(osv) = 1 Then
            Select Case osv.PlatformID
                Case Is = VER_PLATFORM_WIN32s
                    GetOSVer = "Windows 3.x"
                Case Is = VER_PLATFORM_WIN32_WINDOWS
                    Select Case osv.dwVerMinor
                        Case Is = 0
                            If InStr(osv.szCSDVersion, "C") Then
                                GetOSVer = "Windows 95 OSR2"
                            Else
                                GetOSVer = "Windows 95"
                            End If
                        Case Is = 10
                            If InStr(osv.szCSDVersion, "A") Then
                                GetOSVer = "Windows 98 SE"
                            Else
                                GetOSVer = "Windows 98"
                            End If
                        Case Is = 90
                            GetOSVer = "Windows Me"
                    End Select
                Case Is = VER_PLATFORM_WIN32_NT
                    Select Case osv.dwVerMajor
                        Case Is = 3
                            Select Case osv.dwVerMinor
                                Case Is = 0
                                    GetOSVer = "Windows NT 3"
                                Case Is = 1
                                    GetOSVer = "Windows NT 3.1"
                                Case Is = 5
                                    GetOSVer = "Windows NT 3.5"
                                Case Is = 51
                                    GetOSVer = "Windows NT 3.51"
                            End Select
                        Case Is = 4
                            GetOSVer = "Windows NT 4"
                        Case Is = 5
                            Select Case osv.dwVerMinor
                                Case Is = 0
                                    GetOSVer = "Windows 2000"
                                Case Is = 1
                                    GetOSVer = "WindosXP"
                            End Select
                    End Select
            End Select
        End If
    End Function
    
    
    Private Sub Form_Load()
    Text1.Text = GetOSVer
    End Sub

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.