function IsWinNT:boolean; var osv:TOSVersionInfo; begin osv.dwOSVersionInfoSize := sizeof(osv); if(not GetVersionEx(osv)) then raise Exception.Create( 'GetVersionEx exception - check GetLastError'); result := osv.dwPlatformID = VER_PLATFORM_WIN32_NT; end;
I don't know the code to prvent screensaver running but the call to the above function has the following form: If IsWinNT = true then RegisterHotKey(Application.Handle,$BFFF,MOD_ALT,VK_TAB); -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Alistair George Sent: Thursday, 28 November 2002 4:09 p.m. To: Multiple recipients of list delphi Subject: [DUG]: Disable screensaver, determine O/S Hi I can disable screensaver in Win98 but not in NT/WinXP. PSe advise call to determine O/S and as a result the call to disable SS in NT/WinXP. Thanks vm Alistair+ --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/