peruzzi
asked on
How can I Disable and enable start button ?
How can I Disable and enable start button with its list ?
The solution must success under win9x – winme – winxp
I am waiting your answers
Thanks
The solution must success under win9x – winme – winxp
I am waiting your answers
Thanks
//To disable the start button
EnableWindow(FindWindowEx( FindWindow ('Shell_Tr ayWnd', nil),0, 'Button', nil),false);
//To enable the start button
EnableWindow(FindWindowEx( FindWindow ('Shell_Tr ayWnd', nil),0,'Button',nil),true) ;
But the problem is that it disables only for mouse click. If you pres the windows button the list appears.
EnableWindow(FindWindowEx(
//To enable the start button
EnableWindow(FindWindowEx(
But the problem is that it disables only for mouse click. If you pres the windows button the list appears.
Or you could try this to hide the Start button:
procedure ShowStartButton(bValue: Boolean);
var
Tray, Child: hWnd;
C: array[0..127] of Char;
S: String;
begin
Tray := FindWindow('Shell_TrayWnd' , nil);
Child := GetWindow(Tray, GW_CHILD);
while Child <> 0 do
begin
if GetClassName(Child, C, SizeOf(C)) > 0 then
begin
S := StrPAS(C);
if UpperCase(S) = 'BUTTON' then
begin
if bValue = True then ShowWindow(Child, 1)
else
ShowWindow(Child, 0);
end;
end;
Child := GetWindow(Child, GW_HWNDNEXT);
end;
end;
procedure ShowStartButton(bValue: Boolean);
var
Tray, Child: hWnd;
C: array[0..127] of Char;
S: String;
begin
Tray := FindWindow('Shell_TrayWnd'
Child := GetWindow(Tray, GW_CHILD);
while Child <> 0 do
begin
if GetClassName(Child, C, SizeOf(C)) > 0 then
begin
S := StrPAS(C);
if UpperCase(S) = 'BUTTON' then
begin
if bValue = True then ShowWindow(Child, 1)
else
ShowWindow(Child, 0);
end;
end;
Child := GetWindow(Child, GW_HWNDNEXT);
end;
end;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks calinutz
and also thanks for arodionov
code work well with winxp but did not work with winme
what I need is to work under winxp
and also thanks for arodionov
code work well with winxp but did not work with winme
what I need is to work under winxp
Try to look at www.torry.ru
I saw there components which solves your problem.
Type 'Start button' in the quick search.
Alex.