if GetSystemMetrics(SM_MOUSEPRESENT)<> 0 then Lb1.Caption:='You have a mouse' else Lb1.Caption:='You have not a mouse';