Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Username: Password: oppure
OS_VERSION_INFO - Form1.frm

Form1.frm

Caricato da: Albertking82
Scarica il programma completo

  1. '***************************************************************************
  2. '*   Copyright (C) 2007 by Veronese Alberto                                *
  3. '*
  4. '*                                                                         *
  5. '*   This program is free software; you can redistribute it and/or modify  *
  6. '*   it under the terms of the GNU General Public License as published by  *
  7. '*   the Free Software Foundation; either version 2 of the License, or     *
  8. '*   (at your option) any later version.                                   *
  9. '*                                                                         *
  10. '*   This program is distributed in the hope that it will be useful,       *
  11. '*   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
  12. '*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
  13. '*   GNU General Public License for more details.                          *
  14. '*                                                                         *
  15. '*   You should have received a copy of the GNU General Public License     *
  16. '*   along with this program; if not, write to the                         *
  17. '*   Free Software Foundation, Inc.,                                       *
  18. '*   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
  19. '***************************************************************************
  20.  
  21. Private Type OSVERSIONINFO
  22.   dwOSVersionInfoSize As Long
  23.   dwMajorVersion As Long
  24.   dwMinorVersion As Long
  25.   dwBuildNumber As Long
  26.   dwPlatformId As Long
  27.   szCSDVersion As String * 128
  28. End Type
  29.  
  30. Private Declare Function GetVersionEx Lib "kernel32.dll" Alias "GetVersionExA" (lpVersionInformation As OSVERSIONINFO) As Long
  31.  
  32. Private Sub cmdok_Click()
  33. If cmdok.Caption = "Esci" Then
  34. End
  35. Else
  36. cmdok.Caption = "Esci"
  37. End If
  38. Dim os As OSVERSIONINFO ' riceve la versione
  39. Dim retval As Long ' valore di ritorno
  40.  
  41. os.dwOSVersionInfoSize = Len(os) ' Imposta la lunghezza della struttura
  42. retval = GetVersionEx(os) ' legge le info sulla versione di Windows
  43. Txtp.Text = os.dwPlatformId
  44. Txtmv.Text = os.dwMajorVersion
  45. Txtminv.Text = os.dwMinorVersion
  46. Txtbn.Text = os.dwBuildNumber
  47. Txtei.Text = os.szCSDVersion
  48. End Sub