Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Show and Hide windows Task Bar from Windows Application

Show and Hide windows Task Bar from Windows Application

Scheduled Pinned Locked Moved Visual Basic
csharpquestion
14 Posts 7 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Christian Graus

    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.

    J Offline
    J Offline
    Jon_Boy
    wrote on last edited by
    #4

    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

    P 1 Reply Last reply
    0
    • J Jon_Boy

      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

      P Offline
      P Offline
      pdnet
      wrote on last edited by
      #5

      I already do this job. By this, The taskbar is not disabled.

      Arindam Banerjee Sr. Software Developer Rance Computer Pvt Ltd. Kolkata (India)

      D 1 Reply Last reply
      0
      • P pdnet

        I already do this job. By this, The taskbar is not disabled.

        Arindam Banerjee Sr. Software Developer Rance Computer Pvt Ltd. Kolkata (India)

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #6

        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

        1 Reply Last reply
        0
        • P pdnet

          Hi All, I am using Vb.Net 3.5 I want to Hide the windows taskbar when I am starting my windows application, and show the task bar again when I am exit from my application. Please, tell me how can I do that from Vb.net.

          Arindam Banerjee Sr. Software Developer Rance Computer Pvt Ltd. Kolkata (India)

          N Offline
          N Offline
          Nanda_MR
          wrote on last edited by
          #7

          If u want disable the task manager or hide u can use registry and u can make disable and enable.

          P 1 Reply Last reply
          0
          • N Nanda_MR

            If u want disable the task manager or hide u can use registry and u can make disable and enable.

            P Offline
            P Offline
            pdnet
            wrote on last edited by
            #8

            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)

            D 1 Reply Last reply
            0
            • P pdnet

              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)

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #9

              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

              J 1 Reply Last reply
              0
              • D Dave Kreskowiak

                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

                J Offline
                J Offline
                JR212
                wrote on last edited by
                #10

                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 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

                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

                D 1 Reply Last reply
                0
                • J JR212

                  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 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

                  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

                  D Offline
                  D Offline
                  Dave Kreskowiak
                  wrote on last edited by
                  #11

                  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, 2008

                  J 1 Reply Last reply
                  0
                  • D Dave Kreskowiak

                    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, 2008

                    J Offline
                    J Offline
                    Jon_Boy
                    wrote on last edited by
                    #12

                    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

                    L 1 Reply Last reply
                    0
                    • J Jon_Boy

                      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

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #13

                      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.

                      J 1 Reply Last reply
                      0
                      • L Lost User

                        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.

                        J Offline
                        J Offline
                        Jon_Boy
                        wrote on last edited by
                        #14

                        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

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups