Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / August 2006

Tip: Looking for answers? Try searching our database.

IsWindowVisible always returns false when passed a Screensaver's preview hWnd, Why?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ThunderMusic - 30 Aug 2006 16:49 GMT
Hi,
I'm doing a screen saver. When it comes to display a preview, Windows sends
a /p argument followed by a space and a hWnd...  When I send this hWnd to
IsWindowVisible((IntPtr)hWnd); I always receive false...

my definition for IsWindowVisible is like this :

[DllImport("user32.dll")]
static extern bool IsWindowVisible(IntPtr hWnd);

Is this correct?

thanks

ThunderMusic
ThunderMusic - 30 Aug 2006 18:47 GMT
finally, it does not always return false, but I can't understand when and
why it returns true or false... By drawing something in the device (hWnd) or
by displaying a Messagebox before calling IsWindowVisible(hWnd), I managed
to make it return true, but then again, it's not everytime...  Sometimes it
should return true and it returns false... I'm pretty sure it's not a bug,
so there must be something I don't get...  must I put a "DoEvents" (does it
exist in c#?) before my call? Must I monitor for the first time it's visible
and then close when it not visible anymore after that? It would seem weird
to me to wait for something to become visible when this is the very same
thing that called you in the first place...

thanks

ThunderMusic

> Hi,
> I'm doing a screen saver. When it comes to display a preview, Windows
[quoted text clipped - 11 lines]
>
> ThunderMusic

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
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



©2008 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.