We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Why does Process.MainWindowTitle sometimes don't work ?

Thread ID:

Created:

Updated:

Platform:

Replies:

1794 Nov 27,2002 04:33 AM UTC Apr 9,2003 03:32 AM UTC WinForms 1
loading
Tags: FAQ
Timo von Niswandt
Asked On November 27, 2002 04:33 AM UTC

Hello, I want to get informations about the title of processes on remote machines. On some machines (Win2000) the Method Process.GetProcesses() does return informations about running processes, but on some machines (WinNT) I get an exception. Furthermore the Method process.MainWindowTitle() does not return informations for remote processes. Here comes my code: Process process = null; foreach(Process proc in Process.GetProcesses("L1332020")){ MessageBox.Show(proc.ProcessName.ToString()); if(proc.MainWindowTitle.ToString().StartsWith("SessionB")){ process = proc; break; } } if(process==null) MessageBox.Show("No suitable Process found!"); else{ DKC_DllImport.BringWindowToTop (process.MainWindowHandle); DKC_DllImport.ShowWindow(process.MainWindowHandle, 9); //9 = SW_RESTORE } Does anybody have a solution for this problem that works ? Thanks, Timo

Administrator [Syncfusion]
Replied On April 9, 2003 03:32 AM UTC

> Hello, > > I want to get informations about the title of processes on remote machines. On some machines (Win2000) the Method Process.GetProcesses() does return informations about running processes, but on some machines (WinNT) I get an exception. > > Furthermore the Method process.MainWindowTitle() does not return informations for remote processes. > > Here comes my code: > > Process process = null; > foreach(Process proc in Process.GetProcesses("L1332020")){ > MessageBox.Show(proc.ProcessName.ToString()); > if(proc.MainWindowTitle.ToString().StartsWith("SessionB")){ > process = proc; > break; > } > } > > if(process==null) > MessageBox.Show("No suitable Process found!"); > else{ > DKC_DllImport.BringWindowToTop (process.MainWindowHandle); > DKC_DllImport.ShowWindow(process.MainWindowHandle, 9); //9 = SW_RESTORE > } > > Does anybody have a solution for this problem that works ? > > Thanks, Timo

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;