Show and Hide windows Task Bar from Windows Application
-
-
You can set your window position so it obscures the taskbar. You can't stop the user from using the task bar, nor should you want to.
Christian Graus Driven to the arms of OSX by Vista.
-
You can set your window position so it obscures the taskbar. You can't stop the user from using the task bar, nor should you want to.
Christian Graus Driven to the arms of OSX by Vista.
I am just want to use Auto Hide Taskbar feature of the taskbar. Rather, my form Size is sufficiant to show the full screen mode. If my taskbar is hide then my application shows full screen but If my taskbar is shows then my application is not in fool screen mode.
Arindam Banerjee Sr. Software Developer Rance Computer Pvt Ltd. Kolkata (India)
-
You can set your window position so it obscures the taskbar. You can't stop the user from using the task bar, nor should you want to.
Christian Graus Driven to the arms of OSX by Vista.
So basically, would you and make the form size = screen.workingarea? This will work:
With Me .TopMost = True .FormBorderStyle = System.Windows.Forms.FormBorderStyle.None .WindowState = FormWindowState.Maximized End With
Any suggestions, ideas, or 'constructive criticism' are always welcome. "There's no such thing as a stupid question, only stupid people." - Mr. Garrison
-
So basically, would you and make the form size = screen.workingarea? This will work:
With Me .TopMost = True .FormBorderStyle = System.Windows.Forms.FormBorderStyle.None .WindowState = FormWindowState.Maximized End With
Any suggestions, ideas, or 'constructive criticism' are always welcome. "There's no such thing as a stupid question, only stupid people." - Mr. Garrison
-
I already do this job. By this, The taskbar is not disabled.
Arindam Banerjee Sr. Software Developer Rance Computer Pvt Ltd. Kolkata (India)
You cannot, and should not, disable the TaskBar.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
-
If u want disable the task manager or hide u can use registry and u can make disable and enable.
-
Its not Task Manager, I wanted to hide the Task Bar And How using registry.
Arindam Banerjee Sr. Software Developer Rance Computer Pvt Ltd. Kolkata (India)
The only way to hide the Task Bar is to kill the Explorer process, but that's not acceptable to the user either.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
The only way to hide the Task Bar is to kill the Explorer process, but that's not acceptable to the user either.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008simple test on google gives me over 100000 hits.
Public Const SWP_HIDEWINDOW As Integer = &H80
Public Const SWP_SHOWWINDOW As Integer = &H40
Private Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As IntegerDeclare 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
Private Sub bHide_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bHide.Click
Dim hSystray As Integer = FindWindow("Shell_traywnd", "")
SetWindowPos(hSystray, 0, 0, 0, 0, 0, SWP_HIDEWINDOW)
End Sub
Private Sub bShow_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bShow.Click
Dim hSystray As Integer = FindWindow("Shell_traywnd", "")
SetWindowPos(hSystray, 0, 0, 0, 0, 0, SWP_SHOWWINDOW)
End Sub -
simple test on google gives me over 100000 hits.
Public Const SWP_HIDEWINDOW As Integer = &H80
Public Const SWP_SHOWWINDOW As Integer = &H40
Private Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As IntegerDeclare 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
Private Sub bHide_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bHide.Click
Dim hSystray As Integer = FindWindow("Shell_traywnd", "")
SetWindowPos(hSystray, 0, 0, 0, 0, 0, SWP_HIDEWINDOW)
End Sub
Private Sub bShow_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bShow.Click
Dim hSystray As Integer = FindWindow("Shell_traywnd", "")
SetWindowPos(hSystray, 0, 0, 0, 0, 0, SWP_SHOWWINDOW)
End SubThat doesn't disable the TaskBar, it just hides the window temporarily. It's still not a good idea to do.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
That doesn't disable the TaskBar, it just hides the window temporarily. It's still not a good idea to do.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008I guess I don't truly understand the purpose of the request. 1. If pdnet has the app in Kiosk mode, why are you worrying about the taskbar - you can't see it anyways? 2. Don't know about you, but I'd be pissed if I ran an app and it started changing my theme/settings in Windows without me allowing it to do so. All around bad idea to it.
Any suggestions, ideas, or 'constructive criticism' are always welcome. "There's no such thing as a stupid question, only stupid people." - Mr. Garrison
-
I guess I don't truly understand the purpose of the request. 1. If pdnet has the app in Kiosk mode, why are you worrying about the taskbar - you can't see it anyways? 2. Don't know about you, but I'd be pissed if I ran an app and it started changing my theme/settings in Windows without me allowing it to do so. All around bad idea to it.
Any suggestions, ideas, or 'constructive criticism' are always welcome. "There's no such thing as a stupid question, only stupid people." - Mr. Garrison
Sometimes project specifications is to run it full screen so that the taskbar isnt visible. From what I gathered in his post, he doesn't want to disable it, just wants the same functionality as 'Autohide the taskbar' option. I'm kind of curious as to this myself.
-
Sometimes project specifications is to run it full screen so that the taskbar isnt visible. From what I gathered in his post, he doesn't want to disable it, just wants the same functionality as 'Autohide the taskbar' option. I'm kind of curious as to this myself.
EliottA wrote:
Sometimes project specifications is to run it full screen so that the taskbar isnt visible.
The code I posted earlier in this thread accomplishes that. The form covers the task bar, just like VS if you run it in full screen mode without changing the settings or killing the task bar itself.
Any suggestions, ideas, or 'constructive criticism' are always welcome. "There's no such thing as a stupid question, only stupid people." - Mr. Garrison