Guidance
指路人
g.yi.org
software / rapidq / Examples / Registry & INI / Get Windows Version / Version.rq

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
     $OPTIMIZE ON
     $TYPECHECK ON
     CONST ctab = CHR$(9) ' Tab character
     CONST clf = CHR$(10) ' Line Feed Chr
     CONST HKEY_CLASSES_ROOT  = &H80000000
     CONST HKEY_LOCAL_MACHINE = &H80000002
     DIM Registry AS QREGISTRY
     DECLARE SUB ShowVersion (Sender AS QBUTTON)
     CREATE Form AS QFORM
      CAPTION = "Windows Version"
      Width = 252
      Height = 126
      Center
      CREATE Button1 AS QBUTTON
       CAPTION = "Show Windows Version"
       Left = 47
       Top = 18
       Width = 155
       Height = 57
       OnClick = ShowVersion
      END CREATE
     END CREATE
     SUB ShowVersion
      DIM txt AS STRING
      WITH Registry
       .RootKey = HKEY_LOCAL_MACHINE
       .OpenKey("Software\Microsoft\Windows\CurrentVersion", 0)
       IF RIGHT$(.readstring("VersionNumber"), 4) = "2222" THEN
        txt = "Windows 98 SE"
       ELSE
        txt = .readstring("VersionNumber")
       END IF
       SHOWMESSAGE "You are running " + txt
       .closekey
      END SUB
      Form.SHOWMODAL
掌柜推荐
 
 
¥477.00 ·
 
 
¥918.00 ·
 
 
¥370.00 ·
 
 
¥271.00 ·
 
 
¥995.00 ·
 
 
¥1,580.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2003-06-18 12:27:32