Pessoal, Preciso da ajuda dos experts em vb para resolver um problema! Já postei esta pergunta em outros fórums sem sucesso! Estou utilizando o código abaixo para obter o nome da janela principal do sistema da minha empresa. O código está funcionando muito bem, porém não consigo adaptá-lo para obter o nome de uma sub janela derivada desta principal. Preciso: _Ou obter o nome desta sub janela _Ou identificar se ela está ativa _Ou localizar esta sub janela pelo nome Qualquer uma das opções acima resolve o meu problema!!!!!!!!! Código que estou usando para capturar o nome da janela principal: 'Declarações: Private Declare Function GetForegroundWindow Lib "user32" () As Long Declare Function GetActiveWindow Lib "user32" () As Long Public Declare Function GetFocus Lib "user32" () As Long Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long Private Declare Function GetMenu Lib "user32" (ByVal hwnd As Long) As Long Private Declare Function GetMenuItemID Lib "user32" (ByVal hMenu As Long, ByVal nPos As Long) As Long Private Declare Function GetSubMenu Lib "user32" (ByVal hMenu As Long, ByVal nPos As Long) As Long Private Declare Function ModifyMenu Lib "user32" Alias "ModifyMenuA" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long, ByVal wIDNewItem As Long, ByVal lpString As Any) As Long Const MF_BITMAP = 4 Const MF_CHECKED = 8 'Código para Obter nome da janela Principal: Sub Obter_Nome_Da_Janela_Ativa() strClassName = Space(256) strActiveWinTitle = String(256, Chr$(0)) lngActiveWin = GetForegroundWindow() lngRet = GetClassName(lngActiveWin, strClassName, 256) strClassName = Left$(strClassName, lngRet) GetWindowText lngActiveWin, strActiveWinTitle, 256 strActiveWinTitle = Left$(strActiveWinTitle, InStr(strActiveWinTitle, Chr$(0)) - 1) Nome_da_janela_principal = strActiveWinTitle End sub Obrigado Tarcisio