|
21 November 1999 Ref. 05
This weeks tip is on how to enable and disable the "START" button.
Look at the following two procedures:
procedure EnableStartButton;
begin
EnableWindow(FindWindowEx(FindWindow('Shell_TrayWnd',
nil), 0, 'Button', nil), TRUE);
end; {EnableStartButton}
procedure DisableStartButton;
begin
EnableWindow(FindWindowEx(FindWindow('Shell_TrayWnd',
nil), 0, 'Button', nil), FALSE);
end; {DisableStartButton}
When you call the DisableStartButton procedure then the "START" button will be disabled (you can't click on it).
When you call the EnableStartButton procedure after you've called the DisableStartButton procedure then the "START" button will be enabled (restored).
WARNING: Remember to call EnableStartButton to restore the "START" button, after you'ved called the DisableStartButton procedure.