CompactFramework applocation class name

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hello,
I develop for SmartDevice using VS2005
I my application to be able to load multiple times.
In VS2003 I used FindWindow with class name : "#NETCF_AGL_PARK_"
But with VS2005 the FinsWindow cannot find the window.
If I check with RemoteSpy And I see the class name is the same as I search.

This is the code i use :

[DllImport("coredll.dll", EntryPoint = "FindWindowW", SetLastError = true)]
private static extern IntPtr FindWindowCE(string lpClassName, string
pWindowName);

string sName =
Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName;
string sClass = "#NETCF_AGL_PARK_";
IntPtr i1 = FindWindowCE(sClass, sName);

How can I get the application window ?

Thanks,
Sharon

.



Relevant Pages

  • Re: FindWindowW not working for form controls
    ... I can enumerate to find the form I want and the enumerate the child windows of that form outputting both the handle and the caption of each window on the form. ... static extern IntPtr GetWindow ... static extern int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount); ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Handle to main window.
    ... It might be pretty reasonable as long as there is only one focused window ... private static extern IntPtr GetWindowThreadProcessId(IntPtr hwnd, ... IntPtr activeHwnd = GetForegroundWindow; ... "objectref" wrote in message ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: How to catch the Minimize Event to change form.text() property
    ... is pressed a window doesn't change its state (window styles stay the ... const int GW_HWNDNEXT = 2; ... static extern IntPtr GetCapture(); ... > minimizing the form, i wish to set the text property of the form, ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Pressing button
    ... static extern IntPtr FindWindow(string lpClassName, ... public static extern IntPtr FindWindowEx(IntPtr parentHandle, ... IntPtr hWnd, ... then the process is basically find the window by name ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Pressing button
    ... static extern IntPtr FindWindow(string lpClassName, ... public static extern IntPtr FindWindowEx(IntPtr parentHandle, ... IntPtr hWnd, ... then the process is basically find the window by name ...
    (microsoft.public.dotnet.languages.csharp)