モジュール部(fBufEditはNull以前の文字列を返す関数)
Public Const AppDistinguishID= "APPNAME"

Public Function fEnumFindProc(ByVal handle As Long, ByVal lParam As Long) As Boolean
  Ret = EnumChildWindows(handle, AddressOf fEnumChildFindProc, handle)
  fEnumFindProc = True
End Function

Public Function fEnumChildFindProc(ByVal handle As Long, ByVal lParam As Long) As Boolean 
  Name = String(255, Chr(0)) 'バッファ確保
  Leng = Len(Name)
  Ret1 = GetWindowText(handle, Name, Leng) '名前を取得する
  If fBufEdit(Name) = AppDistinguishID & lParam Then
  fEnumChildFindProc = False
  Call ShowWindow(lParam, 9)
  Call SetForegroundWindow(lParam)
  End
  Else
  fEnumChildFindProc = True
  End If
End Function