Enable/Disable Taskbar

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JohnProgrammer

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

    #2
    RE: Enable/Disable Taskbar

    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 "FindWindow A" (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("She ll_traywnd", "")
    SetWindowPos(in tReturn, 0, 0, 0, 0, 0, SWP_SHOWWINDOW)

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

    Dim intReturn As Integer = FindWindow("She ll_traywnd", "")
    SetWindowPos(in tReturn, 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:
    [color=blue]
    > 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[/color]

    Comment

    • JohnProgrammer

      #3
      RE: Enable/Disable Taskbar

      Excellent, that was just the ticket! Many thanks.

      John

      "Crouchie19 98" wrote:
      [color=blue]
      > 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 "FindWindow A" (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("She ll_traywnd", "")
      > SetWindowPos(in tReturn, 0, 0, 0, 0, 0, SWP_SHOWWINDOW)
      >
      > Lastly, double-click Button2 & paste in this code:
      >
      > Dim intReturn As Integer = FindWindow("She ll_traywnd", "")
      > SetWindowPos(in tReturn, 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:
      >[color=green]
      > > 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[/color][/color]

      Comment

      Working...