Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Get Windows Handlers in VB.NET .CompactFramework

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
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…

840 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