home *** CD-ROM | disk | FTP | other *** search
/ Freelog 19 / Freelog019.iso / Prog / Pratique / FichPrin.cpp < prev    next >
C/C++ Source or Header  |  2001-01-29  |  1KB  |  43 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. // une variable de la structure
  27. OSVERSIONINFO veros;
  28. // tjrs selon l'aide, on dimentionne
  29. veros.dwOSVersionInfoSize=sizeof(OSVERSIONINFO);
  30. // on appelle l'API concernΘe
  31. ::GetVersionEx(&veros);
  32. // on traite la valeur retournee par l'appel
  33. if (veros.dwPlatformId==VER_PLATFORM_WIN32_WINDOWS);
  34.    {
  35.    if(veros.dwMinorVersion==0)
  36.    Edit2->Text=" Windows 95";
  37.    else
  38.    Edit2->Text=" Windows 98";
  39.    }
  40. }
  41. //---------------------------------------------------------------------------
  42.  
  43.