home *** CD-ROM | disk | FTP | other *** search
/ Freelog 19 / Freelog019.iso / Prog / Pratique / FichPrin.~cp < prev    next >
Text File  |  2001-01-29  |  1KB  |  41 lines

  1. //---------------------------------------------------------------------------
  2. #include <vcl.h>
  3. #pragma hdrstop
  4.  
  5. #include "FichPrin.h"
  6. //---------------------------------------------------------------------------
  7. #pragma package(smart_init)
  8. #pragma resource "*.dfm"
  9. TForm1 *Form1;
  10. //---------------------------------------------------------------------------
  11. __fastcall TForm1::TForm1(TComponent* Owner)
  12.     : TForm(Owner)
  13. {
  14. }
  15. //---------------------------------------------------------------------------
  16.  
  17. void __fastcall TForm1::Edit1Change(TObject *Sender)
  18. {
  19. MessageBeep(0);    
  20. }
  21. //---------------------------------------------------------------------------
  22. void __fastcall TForm1::Button1Click(TObject *Sender)
  23. {
  24. // version du systeme utilise
  25. // on declare comme precise ds l'aide
  26. OSVERSIONINFO osvi;
  27. osvi.dwOSVersionInfoSize=sizeof(OSVERSIONINFO);
  28. // on appelle l'API concernΘe
  29. ::GetVersionEx(&osvi);
  30. // on traite la valeur retournee par l'appel
  31. if (osvi.dwPlatformId==VER_PLATFORM_WIN32_WINDOWS);
  32.    {
  33.    if(osvi.dwMinorVersion==0)
  34.    Edit2->Text=" Windaube 95";
  35.    else
  36.    Edit2->Text=" Windaube 98";
  37.    }
  38. }
  39. //---------------------------------------------------------------------------
  40.  
  41.