Hi,
The getwindowtext api will get the text in the title bar. You need
to know the windows handle to use the api call.
Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal
hwnd As Integer, ByVal lpString As String, ByVal cch As Integer) As Integer
Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal
hwnd As IntPtr, ByVal lpString As String, ByVal cch As Integer) As Integer
Here is an example
Dim pWord As Process
Dim strTitleBar As String = Space(200)
Dim iResult As Integer
pWord = Process.Start("winword.exe")
iResult = GetWindowText(pWord.MainWindowHandle, strTitleBar, 200)
If iResult <> 0 Then
Me.Text = strTitleBar
Else
MessageBox.Show("GetWindowText failed!")
End If
Ken
-------------------
"shalender verma" <ve**********@yahoo.com> wrote in message
news:09****************************@phx.gbl...
i want to get the text written in the tittle bar of the
window of any other application which apperars on the back
of the form.
e.g i created a form and minimized that form and then i
opened a ms-word window now i again activated that vb form
i created. now i want the text in the tittle bar of the
word window which appears at the back of my vb form
plase give me the solution