[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 240
  • Last Modified:

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.
0
duke_n
Asked:
duke_n
  • 9
  • 6
  • 3
1 Solution
 
craig_capelCommented:
I have a funny feeling that your in England? and your using x-stream correct?


If you are i know a way.
0
 
craig_capelCommented:
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?
0
 
duke_nAuthor Commented:
I am not in England!!
and I dunno what X-Stream is!
And What Does that matter?
0
[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

 
duke_nAuthor Commented:
All that I already know.
BTW:Resizing won't turn off that "fence" either
0
 
duke_nAuthor Commented:
All that I already know.
BTW:Resizing won't turn off that "fence" either
0
 
MadshiCommented:
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(GetWindowThreadProcessID(barWindow, nil), WM_QUIT, 0, 0)). Or you could hide the bar like you already do. But then you have to call SystemParametersInfo(SPI_SETWORKAREA, ...) to turn that fence of.

Regards, Madshi.
0
 
duke_nAuthor Commented:
Could you please write a codesample of SystemParametersInfo(SPI_SETWORKAREA, ...) ?
0
 
MadshiCommented:
I did not test it, but this should remove the top fence, you're talking about:

procedure RemoveTopFence;
var r1 : TRect;
begin
  SystemParametersInfo(SPI_GETWORKAREA, 0, @r1, 0);
  r1.Top := 0;
  SystemParametersInfo(SPI_SETWORKAREA, 0, @r1, 0);
end;

Regards, Madshi.
0
 
duke_nAuthor Commented:
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?
0
 
MadshiCommented:
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.
0
 
craig_capelCommented:
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.
0
 
duke_nAuthor Commented:
Oh, thanx greatly, but it works and it's work is vital to me.
but in background...
0
 
MadshiCommented:
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.
0
 
duke_nAuthor Commented:
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
0
 
duke_nAuthor Commented:
I mean, make all other windows resize themselves back(like if I'd close the window)
0
 
MadshiCommented:
Sorry, I've no idea left...   :-(
0
 
duke_nAuthor Commented:
OK.
Then what you gave  me is OK.
post yer A to get your A.
0
 
MadshiCommented:
Thank you...   :-)
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

  • 9
  • 6
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now