Wrox Programmer Forums
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 10th, 2005, 01:57 AM
Authorized User
 
Join Date: Jan 2005
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to yeetesh
Default Hide the Taskbar

In my Application I want to hide the taskbar completely while my application is running.
One way to do that is to manually select autohide proprty of the taskbar.But I want to hide the taskbar from my application's code.
Any one got any Idea !!!!!!


 
Old January 10th, 2005, 09:25 AM
Authorized User
 
Join Date: Jan 2005
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to yeetesh
Default

I have found the code myself using api
if any one like me is in need of same, the code goes something like this
Private 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
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Const SWP_HIDEWINDOW = &H80
Const SWP_SHOWWINDOW = &H40

Dim TaskBarHwnd As Long

Private Sub Command1_Click()
    If Command1.Caption = "Hide" Then
        Call SetWindowPos(TaskBarHwnd, 0&, 0&, 0&, 0&, 0&, SWP_HIDEWINDOW)
        Command1.Caption = "Show"
    Else
        Call SetWindowPos(TaskBarHwnd, 0&, 0&, 0&, 0&, 0&, SWP_SHOWWINDOW)
        Command1.Caption = "Hide"
    End If
End Sub

Private Sub Form_Load()
    TaskBarHwnd = FindWindow("Shell_traywnd", "")
End Sub







Similar Threads
Thread Thread Starter Forum Replies Last Post
Window visible in taskbar pazzuzu Visual C++ 1 March 31st, 2006 04:21 AM
flashing taskbar button jon23d Access VBA 1 July 7th, 2005 03:26 PM
Windows taskbar from Excel VB scognet Excel VBA 0 July 7th, 2005 08:16 AM
Taskbar tucker Excel VBA 2 July 5th, 2004 04:26 AM
Disabling the Taskbar FSBC Excel VBA 3 April 24th, 2004 03:50 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.