Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Win API / September 2007



Tip: Looking for answers? Try searching our database.

Hiding a Window

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Vinson - 22 Sep 2007 15:26 GMT
In other forums, I have seen people state that hiding a window by class name
is a bad habit because class names are always subject to change.  But what
other methods are there to hide a window?  

I use the ShowWindow or AnimateWindow APIs to hide a window, but they need a
handle which is typically discovered through the FindWindow API and a class
name.   Is there another way?

Incidentally, this post is releated to my previous post (seen in this forum)
concerning hiding the Vista Start Orb.  My VB6 code for hiding a window can
be seen there.  I want to find an alternate way to hide the Start Orb since
the class name method fails.

-  Vinson
Thorsten Albers - 22 Sep 2007 15:53 GMT
Vinson <Vinson@discussions.microsoft.com> schrieb im Beitrag
<5E5BC35C-657F-4BBA-BCFF-5DA578393C72@microsoft.com>...
> In other forums, I have seen people state that hiding a window by class name
> is a bad habit because class names are always subject to change.

To use the window class name really isn't a bad habit. Just ignore people
saying so.

Within one version of Windows the window class name surely isn't subject to
change unless the change of the window class name within the same version
of Windows is intentional. If so, you shouldn't use that window class name
at all because there presumably is a good reason for this behaviour. In all
other cases your use of a window class name should depend on the running
version of Windows. In case you will have to write code for each version of
Windows.

> But what other methods are there to hide a window?  

You shouldn't try to hide a window which can't be hide by the standard
procedure to do so. If it can't be hidden this way there presumably is a
good reason for that.

> I use the ShowWindow or AnimateWindow APIs to hide a window, but they need a
> handle which is typically discovered through the FindWindow API and a class
> name.   Is there another way?

I don't know any. Of course you can make a guess by retrieving additional
information on the window and the window class e.g. with GetWindowLong()
and GetClassLong(). This e.g. allows you to retrieve the handle of the
module which registered the class, and again the handle allows you to get
the filename of the module which may be a hint for you to see if the window
in question may be the one you are looking for.

Signature

----------------------------------------------------------------------
THORSTEN ALBERS                       Universität Freiburg
                                               albers@
                                                      uni-freiburg.de
----------------------------------------------------------------------

Vinson - 23 Sep 2007 02:36 GMT
Thank you for your kind insights, Thorsten.  I will experiment with the APIs
you have suggested to see if there are any clues within the results they
return.

In my project, the Start Button really has no purpose since the workstation
is dedicated to other tasks which are being performed in a public setting
(kiosk).  If anything, the Orb is really in the way and can cause trouble.  I
am hoping someone will be able to provide an alternate method, even if
unorthodox.  Perhaps there is an undocumented API called ObliterateStartOrb?  
=D  

- Vinson

> Vinson <Vinson@discussions.microsoft.com> schrieb im Beitrag
> <5E5BC35C-657F-4BBA-BCFF-5DA578393C72@microsoft.com>...
[quoted text clipped - 31 lines]
> the filename of the module which may be a hint for you to see if the window
> in question may be the one you are looking for.
Mark Yudkin - 23 Sep 2007 08:44 GMT
I believe that you can force kiosk mode in Vista using Group Policy - the
same way it was always done prior to Vista. This is not a programmatic
solution but a configuration issue.

> Thank you for your kind insights, Thorsten.  I will experiment with the
> APIs
[quoted text clipped - 53 lines]
>> window
>> in question may be the one you are looking for.
Vinson - 23 Sep 2007 14:54 GMT
Thank you, Mark.  

I am quite versed in Group Policy as I often set it programatically to hide
various aspects of the desktop, but I have never found anything that would
hide the Start Orb.  Do you know of a specific policy setting that will
accomplish this task?

- Vinson

> I believe that you can force kiosk mode in Vista using Group Policy - the
> same way it was always done prior to Vista. This is not a programmatic
[quoted text clipped - 57 lines]
> >> window
> >> in question may be the one you are looking for.
Karl E. Peterson - 24 Sep 2007 23:52 GMT
> I am quite versed in Group Policy as I often set it programatically to hide
> various aspects of the desktop, but I have never found anything that would
> hide the Start Orb.  Do you know of a specific policy setting that will
> accomplish this task?

Something like this, maybe?

Microsoft Certified Professional Magazine Online | Column: Kiosks Under Your Control
http://mcpmag.com/columns/article.asp?EditorialsID=1158

Signature

.NET: It's About Trust!
http://vfred.mvps.org

Vinson - 25 Sep 2007 03:06 GMT
I suppose in a purely technical since, it would hide the Start Orb when
running an alternate shell, but of course the entire Windows Explorer would
be gone, too.   I might as well run Linux if I am going to go that far.  =D

Thank you for the suggestion, however.    

Vinson

> > I am quite versed in Group Policy as I often set it programatically to hide
> > various aspects of the desktop, but I have never found anything that would
[quoted text clipped - 5 lines]
> Microsoft Certified Professional Magazine Online | Column: Kiosks Under Your Control
> http://mcpmag.com/columns/article.asp?EditorialsID=1158
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.