Hide clock in the task strip area

zhaozj2021-02-08  227

Hide clock in the task strip area

// Hide clock

Procedure TFORM1.BUTTON1CLICK (Sender: TOBJECT);

VAR

HN: hwnd;

Begin

HN: = FindWindowEx (FindWindow (FindWindow ('shell_trayWnd', NIL), 0,

'TRAYNOTIFYWND', NIL), 0, 'TRAYCLOCKWCLASS', NIL;

IF HN <> 0 THEN

Showwindow (HN, SW_HIDE);

END;

// Reproduce the clock

Procedure TFORM1.BUTTON2CLICK (Sender: TOBJECT);

VAR

HN: hwnd;

Begin

HN: = FindWindowEx (FindWindow (FindWindow ('shell_trayWnd', NIL), 0,

'TRAYNOTIFYWND', NIL), 0, 'TRAYCLOCKWCLASS', NIL;

IF HN <> 0 THEN

ShowWindow (HN, SW_SHOW);

END;

转载请注明原文地址:https://www.9cbs.com/read-2782.html

New Post(0)