Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jul 26th, 2006, 10:26 PM   #1
brownhead
Programmer
 
Join Date: Mar 2006
Location: California
Posts: 37
Rep Power: 0 brownhead is on a distinguished road
Send a message via AIM to brownhead Send a message via MSN to brownhead
Hiding a Window From the Taskbar (Not Exlusivley for VB)

I'm trying to make a function the will hide a window from the taskbar. With VB windows (And I'm not positive on this but i'm pretty sure: All windows with the CS_OWNDC class style/extension/w-e) you can simply add or remove the WC_APPWINDOW style, but I'm looking for a way to do it with ALL windows. If anybody could help me out it'd be appreciated (If you only know how to do it in another language, or are simply more comfortable with a different languag, I don't really mind translating it to VB, or you can just kinda give me a general idea how to...) G'day all, and if you need more info or anything, just ask . Thankee
brownhead is offline   Reply With Quote
Old Jul 27th, 2006, 12:49 AM   #2
Booooze
Expert Programmer
 
Booooze's Avatar
 
Join Date: Mar 2006
Location: Igloo
Posts: 710
Rep Power: 3 Booooze is on a distinguished road
Send a message via MSN to Booooze
I know I have seen the code around somewhere. Have you tried google? Try A1vbcode.com, and freevbcode.com, and any free vb code site. Those seemed to have turned up some results. Also, if you havent done so, go download the apiguide from allapi.net (address may have changed). It may very well be in there.
Booooze is offline   Reply With Quote
Old Jul 27th, 2006, 1:28 AM   #3
bigguy
Professional Programmer
 
bigguy's Avatar
 
Join Date: Sep 2005
Location: Arkansas
Posts: 296
Rep Power: 0 bigguy is an unknown quantity at this point
Send a message via AIM to bigguy Send a message via MSN to bigguy Send a message via Yahoo to bigguy
vb6 = formname.showintaskbar = false
Same for vb.net to I think.
__________________
Forgiveness is the fragrance that the violet sheds on the heal that has crushed it. - Mark Twain

Destruction leads to a very rough road, but it also breeds creation.
bigguy is offline   Reply With Quote
Old Jul 27th, 2006, 2:24 AM   #4
brownhead
Programmer
 
Join Date: Mar 2006
Location: California
Posts: 37
Rep Power: 0 brownhead is on a distinguished road
Send a message via AIM to brownhead Send a message via MSN to brownhead
Bigguy, thats only for forms under your control... I'm talking about any window, and the only thing provided is the Handle (hWnd). And Boooze, I've been sifting around all the API's for awhile now (I have alot of experiance with API's concerning windows, so I was able to check ALOT of them, didn't even have to look many constants up) and I've tried varying combinations of window styles (Using SetWindowLong and GetWindowLong), trying to find out a pattern that signifies that it won't appear in the task bar (Class Setting/Style/W-E: CS_OWNDC and Window Ex Style: WS_EX_APPWINDOW will make it appear, and without the APPWINDOW style it'll dissapear. Can't seem to set the class style though... SetClassLong is how your supposed to do it, but its only working with windows under my control). I'm also gonna try SubClassing so that I can trick the TaskBar program (I think explorer controls the TaskBar..) that the window isn't visible, and then if that fails I'll try to create an invisible parent window that'll shadow the real one. But if anybody has some tips it'd be great (And Boooze, I'll check those 2 sites out, hopefully they'll have something)
brownhead is offline   Reply With Quote
Old Jul 27th, 2006, 3:22 AM   #5
v0id
Hobbyist Programmer
 
Join Date: Apr 2006
Posts: 155
Rep Power: 3 v0id is on a distinguished road
Try look at MSDN, they probably have it.

If you set your mainwindow in C++ to WS_CHILD, it don't show up, maybe it's the same in VB.net.
__________________
-- v0id
v0id is offline   Reply With Quote
Old Jul 27th, 2006, 3:42 AM   #6
bigguy
Professional Programmer
 
bigguy's Avatar
 
Join Date: Sep 2005
Location: Arkansas
Posts: 296
Rep Power: 0 bigguy is an unknown quantity at this point
Send a message via AIM to bigguy Send a message via MSN to bigguy Send a message via Yahoo to bigguy
WHy dont you make it hide taksbar all together? lol
__________________
Forgiveness is the fragrance that the violet sheds on the heal that has crushed it. - Mark Twain

Destruction leads to a very rough road, but it also breeds creation.
bigguy is offline   Reply With Quote
Old Jul 27th, 2006, 5:03 AM   #7
john Wesley
Hobbyist Programmer
 
john Wesley's Avatar
 
Join Date: May 2006
Location: United Kingdom
Posts: 119
Rep Power: 3 john Wesley is on a distinguished road
Send a message via MSN to john Wesley Send a message via Yahoo to john Wesley
I know a way you can do it using api's.

you need....FindWindow & SetWindowPos...

Dhwnd = FindWindow("CabinetWClass", vbNullString)
Call SetWindowPos(Dhwnd, 0, 0, 0, 0, 0, SWP_HIDEWINDOW)

I have test this way of doing it with as many different windows as I could find, the only ones I found it does not remove are the #37720(dialog)* windows (* may not be the exact class name.)
__________________
Mona Lisa must of had the highway blues you can tell by the way she smiles..
john Wesley is offline   Reply With Quote
Old Jul 27th, 2006, 1:52 PM   #8
brownhead
Programmer
 
Join Date: Mar 2006
Location: California
Posts: 37
Rep Power: 0 brownhead is on a distinguished road
Send a message via AIM to brownhead Send a message via MSN to brownhead
WS_CHILD is an extremly good idea, dunno why I didn't think of that (I guess I just assumed that you couldn't set WS_CHILD, that it had to really be a child window)... anyways, John Wesley, that hides the window altogether... and you can achieve that a bit more easily with ShowWindow (ShowWindow hWnd, 0 and ShowWindow hWnd, 1). Thanks all

Edit: Dangit , WS_CHILD doesn't work.. probably because its still counted as a top level window.

Last edited by brownhead; Jul 27th, 2006 at 2:04 PM.
brownhead is offline   Reply With Quote
Old Jul 27th, 2006, 8:10 PM   #9
Booooze
Expert Programmer
 
Booooze's Avatar
 
Join Date: Mar 2006
Location: Igloo
Posts: 710
Rep Power: 3 Booooze is on a distinguished road
Send a message via MSN to Booooze
http://a1vbcode.com/app-1332.asp

Look there. It might solve your problem. I'm not big on API'S anymore, but you might be able to modify to do what you want. WS_CHILD may not work, but perhaps WS_CLIPSHILDREN will. (that's a guess) The link may help you out.
Booooze is offline   Reply With Quote
Old Jul 28th, 2006, 10:16 AM   #10
v0id
Hobbyist Programmer
 
Join Date: Apr 2006
Posts: 155
Rep Power: 3 v0id is on a distinguished road
I'm not a VB guy, but isn't there some SetWindowPos-function, like there's in C? If there's try set it with the flag SWP_HIDEWINDOW.
__________________
-- v0id
v0id is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Char[11] -> LPCWSTR Kilo C++ 5 May 30th, 2006 3:47 AM
GUI Progress Bar badbasser98 C++ 55 Nov 4th, 2005 7:28 AM
Arranging Views of Project Explorer, Property window and Form Layout java_roshan Visual Basic 6 Sep 30th, 2005 2:55 PM
New Window Chris Weimer HTML / XHTML / CSS 3 Sep 20th, 2005 9:18 AM
WIN32 Creating a full screen window hemanth.balaji C 1 May 21st, 2005 3:48 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:16 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC