473,486 Members | 2,476 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Hiding the taskbar completely

lotus18
866 Contributor
Hello World

I have an API here that shows and hides the windows taskbar. My question is ... how can I completely hide the taskbar without a space below? Like setting it to Auto-hide the taskbar on the taskbar properties? When I run this program it seems like the taskbar's opacity=0 or invisible but still it has a little space below. Do you get what I mean?

I want to show how is it really looks like but I don't know how to insert an image here.

Expand|Select|Wrap|Line Numbers
  1. Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
  2. Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
  3. Public Const SWP_HIDEWINDOW = &H80
  4. Public Const SWP_SHOWWINDOW = &H40
  5.  
  6.  
  7. Public Sub ShowTaskBar()
  8.     Dim adTask As Long
  9.     adTask = FindWindow("Shell_traywnd", vbNullString)
  10.     SetWindowPos rtn, 0, 0, 0, 0, 0, SWP_SHOWWINDOW
  11. End Sub
  12.  
  13.  
  14. Public Sub HideTaskBar()
  15.     Dim adTask As Long
  16.     adTask = FindWindow("Shell_traywnd", vbNullString)
  17.     SetWindowPos rtn, 0, 0, 0, 0, 0, SWP_HIDEWINDOW
  18. End Sub
  19.  
  20.  
Nov 20 '07 #1
6 2277
debasisdas
8,127 Recognized Expert Expert
Is that code working for you ?
Nov 20 '07 #2
lotus18
866 Contributor
Is that code working for you ?
Hi Debasisdas

Yes, it is working for me. Can you give me a solution to my problem?
Nov 20 '07 #3
lotus18
866 Contributor
Hello!!!

Is anyone can give me a solution on how to solve this???
Nov 20 '07 #4
AHMEDYO
112 New Member
HI..

First your code is working good and all is ok but you post it with error with Setwindowspos call with the Hwnd Variable. it must be "adTask" not "rtn"

Second, i was test it and no space apperar or anything like that ,i see that taskbar is fully hidden!!!

Best Regards
Nov 20 '07 #5
lotus18
866 Contributor
HI..

First your code is working good and all is ok but you post it with error with Setwindowspos call with the Hwnd Variable. it must be "adTask" not "rtn"

Second, i was test it and no space apperar or anything like that ,i see that taskbar is fully hidden!!!

Best Regards
OK. Sorry for that line. I did not double check it before posting. really there's no space below?
Nov 20 '07 #6
AHMEDYO
112 New Member
yes, and you know i think that if you make it like auto hide taskbar it will be with small line at bottom to help user to show it again. i think you are in the right way just test it again

Best regards
Nov 20 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

4
6309
by: Andrew Poulos | last post by:
If I use this code to maximise a browser window: window.moveTo(0,0); window.resizeTo(screen.width,screen.height); it works but on Windows the user can have a taskbar visible and the browser...
4
6417
by: kurotsuke | last post by:
How can I hide a Form (instead of having it reduced to the taskbar) when the minimize button is pressed in C# (there's an icon in the tray bar)? I added the code protected override void...
7
6827
by: Danielb | last post by:
I want my application to run most of the time as just an notify icon visible in the system tray, with some dialogs windows that open if the user selects an option from the context menu on the tray...
2
3814
by: Max | last post by:
Hello, My VB.NET application displays a Windows form in a panel on my main form. While my application has the focus, I want the form in the panel to have the "topmost" position, even if it is...
0
1493
by: Madhuri | last post by:
I will start with an example. Suppose I have 3 applications. First is Windows application(C#). Other two applications are also windows application but in VC++ or VB. Suppose my first application is...
6
2249
by: UJ | last post by:
How can I hide the task bar through code? I essentially want to change the option to hide automatically so I can use the full screen. TIA - Jeff.
11
3142
by: Alex | last post by:
Hello all, I have a main form(say "form1") .i want to display another form(say "form2") on occuring of an event (say a button click) and want to hide it after some time so that it will again...
2
2593
by: Mufasa | last post by:
Is there a way to hide the windows taskbar. Or change the option to auto hide it ? Thanks.
162
10060
by: Sh4wn | last post by:
Hi, first, python is one of my fav languages, and i'll definitely keep developing with it. But, there's 1 one thing what I -really- miss: data hiding. I know member vars are private when you...
0
7105
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6967
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7341
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4870
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4564
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1381
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
600
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
266
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.