Foros


Comfort Software :: Foros :: Development
<< Tema anterior | Tema siguiente >>   


Autor Mensaje
Kevin
Tue Jan 08 2008, 01:58PM
Miembro registrado #42
Unido: Tue Jan 08 2008, 11:41AM
Mensajes: 2
Thanks for your quick reply ... you got me headed in the right direction.

Here is the code in C# (almost exactly as you describe in VB)

public const Int32 WM_USER = 1024;
public const Int32 WM_CSKEYBOARD = WM_USER + 192;

[DllImport("user32.dll", EntryPoint = "FindWindow")]
private static extern Int32 FindWindow(string _ClassName, string _WindowName);

[DllImport("User32.DLL")]
public static extern Boolean PostMessage(Int32 hWnd, Int32 Msg, Int32 wParam, Int32 lParam);


Int32 hWnd = FindWindow("TFirstForm", "CKeyboardFirstForm");
PostMessage(hWnd, WM_CSKEYBOARD, 1, 0 ); // Show
PostMessage(hWnd, WM_CSKEYBOARD, 2, 0); // Hide


Now that I have that working... I've got a couple more questions -

1 - Is there a way to position the keyboard without any user intervention? Would i do this through an API call? I kind a new at the API interface - please bare with me.

2- Is there a way to disable/hide/remove the close and autohide icons?

Thank You - you have been most helpful!
Volver arriba
Moderadores: Comfort

Saltar:     Volver arriba

Sindicalizar este hilo: rss 0.92 Sindicalizar este hilo: rss 2.0 Sindicalizar este hilo: RDF
Powered by e107 Forum System