How to Find out if the CPU Supports the CPUID Instruction

Posted December 15th @ 1:05 pm by m3Rlin

Sometimes you may want to find out if the CPU supports the CPUID instruction (late 486+ or Pentium+) to find out the CPU type. Well, this code should be what you need:
<pre>
<i>{$ifndef ver80} // Because of 32 bit register use</i>
<b>function</b> GetCpuIDSupport: Boolean; <b>assembler</b>;
<b>asm</b>
push ebx
mov @Result, True
pushfd [...]

How to Find Out if the Taskbar’s Auto Hide Feature is On

Posted December 15th @ 12:00 pm by m3Rlin

The easiest and fastest way to find out if the Windows taskbar’s auto hide feature is on is to use the Windows SHAppBarMessage() function. Here’s the Object Pascal code port:

uses ShellAPI;

function TaskbarAutoHide: Boolean;
var
ABData: TAppBarData;
begin
ABData.cbSize := SizeOf(ABData);
Result := ((SHAppBarMessage(ABM_GETSTATE, ABData) and ABS_AUTOHIDE) > 0);
end;

« Previous EntriesNext Entries »