Foros


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

Detect if Keyboard is visible

Autor Mensaje
Pablo
Fri Oct 17 2008, 06:04PM
Miembro registrado #202
Unido: Fri Oct 17 2008, 05:22PM
Mensajes: 2
How I can detect in program if the Keyboard is visible (open)?

I need change position of distinct windows in VB according if the Keyboard is visible (open) or not.

Thanks.
Volver arriba
Comfort
Sat Oct 18 2008, 01:17PM


Unido: Wed Sep 19 2007, 03:42PM
Mensajes: 617
Method 1

Dim hWnd As Long
hWnd = FindWindow("TMainKeyboardForm", vbNullString)
If (IsWindowVisible(hWnd)) Then
........


Method 2

Dim i As Integer = GetTopWindow(0) 'Initialize
Dim Screen_Text As String = ""
' Get handle for On-Screen Keyboard if it is visible
While (i <> 0)
    If (IsWindowVisible(i)) Then
        Screen_Text = Space(255)
        GetWindowText(i, Screen_Text, 255)
        If (Screen_Text.Trim = "On-Screen Keyboard") Then
            Keyboard_hWnd2 = i
        End If
    End If
    i = GetNextWindow(i, 2)
End While


Have a nice day
Volver arriba
Pablo
Sat Oct 18 2008, 09:30PM
Miembro registrado #202
Unido: Fri Oct 17 2008, 05:22PM
Mensajes: 2
Very thanks.
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