Capturing a Window Title

E

Elliot

The following code iterates through any process with the name
IEXPLORE. The property myProcess.MainWindowTitle incorrectly returns
an empty string for each item. The myProcess.id property correctly
returns a unique program identifier.

Is retrieving a window title a problem in asp.net?


Dim myProcesses() As Process
Dim myProcess As Process

myProcesses = Process.GetProcessesByName("IEXPLORE")
For Each myProcess In myProcesses
ListBox1.Items.Add("Title " & myProcess.MainWindowTitle)'Doesn't
Work
ListBox1.Items.Add("ID " & myProcess.id) 'Does Works
Next


Thank you,
Elliot Semmelman
 
C

Chris Jackson

Because the ASP.NET process on the server doesn't have a window title - it's
just a service, after all. Are you attempting to access the window title on
the client? Your code behind runs on the server, not on the client.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top