duke_n
asked on
Hiding a handmade taskbar
There's a window docked on the top of screen. the fact that it's docked there makes a "Fence" for all other windows to move,get maximized,ect.(=acts like a taskbar) If I execute the following
ShowWindow(FindWindow(nil, 'Name'),sw _hide),
then the window is being hidden, but the "fence" stays. How to hide it so the "fence" will go too.
ShowWindow(FindWindow(nil,
then the window is being hidden, but the "fence" stays. How to hide it so the "fence" will go too.
Wait.... i am VERY wrong, once you have the window handle, then you can resize the windows if you like, or close the window down, is this a program or what that does this? can i have a look?
ASKER
I am not in England!!
and I dunno what X-Stream is!
And What Does that matter?
and I dunno what X-Stream is!
And What Does that matter?
ASKER
All that I already know.
BTW:Resizing won't turn off that "fence" either
BTW:Resizing won't turn off that "fence" either
ASKER
All that I already know.
BTW:Resizing won't turn off that "fence" either
BTW:Resizing won't turn off that "fence" either
Well, there are several approaches. Probably this bar uses those SHAppBarMessage API. Then you could either try to send an official SHAppBarMessage to that bar (don't know how). Or you could find out to which process the bar belongs (GetWindowThreadProcessID) and stop that application (e.g. PostThreadMessage(GetWindo wThreadPro cessID(bar Window, nil), WM_QUIT, 0, 0)). Or you could hide the bar like you already do. But then you have to call SystemParametersInfo(SPI_S ETWORKAREA , ...) to turn that fence of.
Regards, Madshi.
Regards, Madshi.
ASKER
Could you please write a codesample of SystemParametersInfo(SPI_S ETWORKAREA , ...) ?
I did not test it, but this should remove the top fence, you're talking about:
procedure RemoveTopFence;
var r1 : TRect;
begin
SystemParametersInfo(SPI_G ETWORKAREA , 0, @r1, 0);
r1.Top := 0;
SystemParametersInfo(SPI_S ETWORKAREA , 0, @r1, 0);
end;
Regards, Madshi.
procedure RemoveTopFence;
var r1 : TRect;
begin
SystemParametersInfo(SPI_G
r1.Top := 0;
SystemParametersInfo(SPI_S
end;
Regards, Madshi.
ASKER
this is great.
but there was taskbar(Another one-One I needed for work) over the taskbar I hidden, and setting the fence top to 0 didn't move the "vital" taskbar to the
top of fence. it left it "hanging in the middle of the screen. How o treat that?
but there was taskbar(Another one-One I needed for work) over the taskbar I hidden, and setting the fence top to 0 didn't move the "vital" taskbar to the
top of fence. it left it "hanging in the middle of the screen. How o treat that?
Well, I think the best way would be to stop the program to which the taskbar belongs, that you want to hide. Then the program should delete the taskbar correctly, so that the other taskbar takes it place at the top of the screen.
Try the PostThreadMessage suggestion from my answer.
Regards, Madshi.
Try the PostThreadMessage suggestion from my answer.
Regards, Madshi.
i wrote a program with Madshi's help a while back, i turned it
into a small program that kills windows threads...
when i say help, i copied his post thread command, and experimented witht the rest!....
http://members.xoom.com/craig_c/killthre.zip
Craig C.
into a small program that kills windows threads...
when i say help, i copied his post thread command, and experimented witht the rest!....
http://members.xoom.com/craig_c/killthre.zip
Craig C.
ASKER
Oh, thanx greatly, but it works and it's work is vital to me.
but in background...
but in background...
Well, okay, try this one:
procedure HideAppBar(window: THandle);
var abd : TAppBarData;
begin
ZeroMemory(@abd, sizeOf(TAppBarData));
abd.cbSize := sizeOf(TAppBarData);
abd.hWnd := FindWindow(nil,'Name');
SHAppBarMessage(ABM_REMOVE , abd);
end;
Regards, Madshi.
procedure HideAppBar(window: THandle);
var abd : TAppBarData;
begin
ZeroMemory(@abd, sizeOf(TAppBarData));
abd.cbSize := sizeOf(TAppBarData);
abd.hWnd := FindWindow(nil,'Name');
SHAppBarMessage(ABM_REMOVE
end;
Regards, Madshi.
ASKER
Nope.
this one doesn't do anything at all.
Look with pieces of your code, I managed to hide it, and to remove the fence for windows maximizing, but the Icons on the desktop are still aligned to the fence.....
how to kill the fence once and for all
this one doesn't do anything at all.
Look with pieces of your code, I managed to hide it, and to remove the fence for windows maximizing, but the Icons on the desktop are still aligned to the fence.....
how to kill the fence once and for all
ASKER
I mean, make all other windows resize themselves back(like if I'd close the window)
Sorry, I've no idea left... :-(
ASKER
OK.
Then what you gave me is OK.
post yer A to get your A.
Then what you gave me is OK.
post yer A to get your A.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you are i know a way.