473,406 Members | 2,956 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Enable/Disable Taskbar

I know I can fill the screen in VB.NET by starting my window maximized and
without a border.

My question is; in VB.NET is there a way to enable/disable the taskbar much
like doing the "always on top" feature? I would like my program to
automatically "hide" the taskbar when running.

Thanks.

John
Nov 21 '05 #1
2 24770
XP is the operating system to enable/disable the taskbar, but if you want to
hide it then follow these steps:

Start a new Windows application & add two button (Button1 & Button2
respectively)

Button1 will be show Taskbar
Button2 will be hide the Taskbar

Declarations:

Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal
lpClassName As String, ByVal lpWindowName As String) As Integer
Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Integer, ByVal
hWndInsertAfter As Integer, ByVal x As Integer, ByVal y As Integer, ByVal cx
As Integer, ByVal cy As Integer, ByVal wFlags As Integer) As Integer

Public Const SWP_HIDEWINDOW = &H80
Public Const SWP_SHOWWINDOW = &H40

Now, doule-click Button1 & add the following code:

Dim intReturn As Integer = FindWindow("Shell_traywnd", "")
SetWindowPos(intReturn, 0, 0, 0, 0, 0, SWP_SHOWWINDOW)

Lastly, double-click Button2 & paste in this code:

Dim intReturn As Integer = FindWindow("Shell_traywnd", "")
SetWindowPos(intReturn, 0, 0, 0, 0, 0, SWP_HIDEWINDOW)

Run the program & click button 2 to hide the Taskbar & button1 to show it.

Remember, to show the Taskbar on form closing or you'll have no Taskbar.

I hope this helps.

"JohnProgrammer" wrote:
I know I can fill the screen in VB.NET by starting my window maximized and
without a border.

My question is; in VB.NET is there a way to enable/disable the taskbar much
like doing the "always on top" feature? I would like my program to
automatically "hide" the taskbar when running.

Thanks.

John

Nov 21 '05 #2
Excellent, that was just the ticket! Many thanks.

John

"Crouchie1998" wrote:
XP is the operating system to enable/disable the taskbar, but if you want to
hide it then follow these steps:

Start a new Windows application & add two button (Button1 & Button2
respectively)

Button1 will be show Taskbar
Button2 will be hide the Taskbar

Declarations:

Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal
lpClassName As String, ByVal lpWindowName As String) As Integer
Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Integer, ByVal
hWndInsertAfter As Integer, ByVal x As Integer, ByVal y As Integer, ByVal cx
As Integer, ByVal cy As Integer, ByVal wFlags As Integer) As Integer

Public Const SWP_HIDEWINDOW = &H80
Public Const SWP_SHOWWINDOW = &H40

Now, doule-click Button1 & add the following code:

Dim intReturn As Integer = FindWindow("Shell_traywnd", "")
SetWindowPos(intReturn, 0, 0, 0, 0, 0, SWP_SHOWWINDOW)

Lastly, double-click Button2 & paste in this code:

Dim intReturn As Integer = FindWindow("Shell_traywnd", "")
SetWindowPos(intReturn, 0, 0, 0, 0, 0, SWP_HIDEWINDOW)

Run the program & click button 2 to hide the Taskbar & button1 to show it.

Remember, to show the Taskbar on form closing or you'll have no Taskbar.

I hope this helps.

"JohnProgrammer" wrote:
I know I can fill the screen in VB.NET by starting my window maximized and
without a border.

My question is; in VB.NET is there a way to enable/disable the taskbar much
like doing the "always on top" feature? I would like my program to
automatically "hide" the taskbar when running.

Thanks.

John

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: HolaGoogle | last post by:
Hi all, Can you please tell me what's wrong with my code??? i do have this database in wich i have to field.One is a "yes/no" field and another one is "number" field. To display the yes/no field...
2
by: HolaGoogle | last post by:
Can you please tell me the right way to do this?? it's realy important! thanks in advance... Hi all, Can you please tell me what's wrong with my code??? i do have this database in wich i have...
3
by: Bob Bedford | last post by:
I've this code: function checkdate(FormSubmit){ alert(document.getElementById('Mois').value); if(eval(document.getElementById('Mois'))>0 && eval(document.getElementById('Annee'))>0){...
3
by: Alphonse Giambrone | last post by:
I am trying to enable/disable a requiredfieldvalidator on the client side and am generating an error. I had found some documentation on validation which states that I should be able to...
1
by: hortoristic | last post by:
We are using JavaScript to Enable/Disable certain fields on web pages based on business rules. A simple example is if when using an option type tag, and the two options are Yes and No. If YES...
0
by: Big John | last post by:
I have not been able to successfully code a toggle button to enable /disable a record filter on a form.... I have been able to put seperate a button that will enable a record filter but cannot get...
1
by: anthony | last post by:
Hi, I have a VB.NET application that runs on Embedded XP, the user can logon with password for different levels of right within the application. My boss wants the XP taskbar being hiden or...
2
by: RootSpy2006 | last post by:
Hi All, Problem Definition: --------------------- Microsoft Wirelss Keyboard works in BIOS but does not work when booting into windows. Discovered Work-around: -----------------------------...
2
by: Naushad | last post by:
Hi all, I am using the countinous form. I want to Enable/Disable the some fields for perticular records as per the following condition when open the form. I have written this code in "On Current...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.