RE: hide cursor for kiosk application (powerpoint)



Hi M,

Thank you for your prompt response.

The FindWindow function can only retrieves a handle to the top-level window
whose class name and window name match the specified strings. This function
does not search child windows.

To search child windows, use the FindWindowEx function. This function
searches the immediate child windows of the specified parent window.

The following is the code to retrieve the handle of the paneClassDC "Slide
Show" window.

using System.Runtime.InteropServices;

[DllImport("user32.dll")]
static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter,
string lpszClass, string lpszWindow);
[DllImport("user32.dll")]
static extern private IntPtr GetWindow(IntPtr hWnd, int uCmd);

const int GW_CHILD = 5;

IntPtr child1 = FindWindowEx(this.webBrowser1.Handle, IntPtr.Zero, "Shell
Embedding", "");
IntPtr child2 = FindWindowEx(child1, IntPtr.Zero, "Shell DocObject View",
"");
IntPtr child3 = FindWindowEx(child2, IntPtr.Zero, "childClass", "");
// because the 'childClass' window only has one child window and the child
window has a long window name, I use the GetWindow function to get the
child window for convenience
IntPtr child4 = GetWindow(child3, GW_CHILD);
IntPtr child5 = FindWindowEx(child4, IntPtr.Zero, "paneClassDC", "Slide
Show");

The variable child5 returns the handle of of the paneClassDC window.

Hope this helps.

Sincerely,
Linda Liu
Microsoft Online Community Support

.



Relevant Pages

  • Re: getting the dimensions/location of a workbook
    ... (ByVal lpClassName As String, ByVal lpWindowName As String) ... Private Declare Function GetClientRect Lib "user32" (ByVal hwnd As Long, ... Here's how I find the handle of the current workbook window: ... IntPtr hWndExcel = new IntPtr; ...
    (microsoft.public.excel.programming)
  • ComboBox class, CB_INSERTSTRING , VB.NET and marshalling... [WORKING VERSION]
    ... send the message WM_SETTEXT with the string You wanted. ... Below You find the declaration of SendMessage and the line of code that send ... IntPtr, ByVal wMsg As IntPtr, ByVal wParam As IntPtr, ... 'Code (argl_hChildWnd is the handle of the Edit window into the combo) ...
    (microsoft.public.dotnet.languages.vb)
  • Re: restore application from systray -- IT WORKS!
    ... to the screen with the focus instead of opening a new window. ... (ByVal lpClassName As String, ByVal lpWindowName As String) ... (ByVal hWnd As IntPtr, ByVal nCmdShow As Integer) ... Private Sub Form1_Load(ByVal sender As System.Object, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: system tray help -- IT WORKS!
    ... to the screen with the focus instead of opening a new window. ... (ByVal lpClassName As String, ByVal lpWindowName As String) ... (ByVal hWnd As IntPtr, ByVal nCmdShow As Integer) ... Private Sub Form1_Load(ByVal sender As System.Object, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: System tray help -- IT WORKS!
    ... to the screen with the focus instead of opening a new window. ... (ByVal lpClassName As String, ByVal lpWindowName As String) ... (ByVal hWnd As IntPtr, ByVal nCmdShow As Integer) ... Private Sub Form1_Load(ByVal sender As System.Object, ...
    (microsoft.public.dotnet.languages.vb)