Solved

Get Windows Handlers in VB.NET .CompactFramework

Posted on 2003-12-03
3
355 Views
Last Modified: 2012-06-21
I am writing a program for Pocket PC 2002 using VB.Net 2003
I want to use the SHSetAppKeyWndAssoc so I need to the windows handle.  However, the Me.hwn is private member so I use the GetActiveWindow.  But the GetActiveWindow Function return error.  Is there any other way I can get the windows Handle?
0
Comment
Question by:McTao
3 Comments
 
LVL 22

Accepted Solution

by:
cookre earned 125 total points
ID: 9867872
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q129/8/52.asp&NoWebContent=1

In effect, it says GetActiveWindow() returns NULL if some window not owned by the calling thread has focus.  

Workaround: Use GetForegroundWindow() instead
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show, step by step, how to integrate R code into a R Sweave document
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now