![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
|
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 ![]() |
|
|
|
|
|
#2 |
|
Expert Programmer
|
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.
|
|
|
|
|
|
#3 |
|
Professional Programmer
|
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. |
|
|
|
|
|
#4 |
|
Programmer
|
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) |
|
|
|
|
|
#5 |
|
Hobbyist Programmer
Join Date: Apr 2006
Posts: 155
Rep Power: 3
![]() |
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
|
|
|
|
|
|
#6 |
|
Professional Programmer
|
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. |
|
|
|
|
|
#7 |
|
Hobbyist Programmer
|
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.. |
|
|
|
|
|
#8 |
|
Programmer
|
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. |
|
|
|
|
|
#9 |
|
Expert Programmer
|
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. |
|
|
|
|
|
#10 |
|
Hobbyist Programmer
Join Date: Apr 2006
Posts: 155
Rep Power: 3
![]() |
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
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
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 |