Solved

Get Windows Handlers in VB.NET .CompactFramework

Posted on 2003-12-03
3
346 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

This is an explanation of a simple data model to help parse a JSON feed
A short article about problems I had with the new location API and permissions in Marshmallow
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

757 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

21 Experts available now in Live!

Get 1:1 Help Now