Click here to Skip to main content
15,923,051 members
Home / Discussions / C#
   

C#

 
Generaldisplay custom column names in datagrid Pin
itssuk15-Mar-05 2:11
itssuk15-Mar-05 2:11 
GeneralRe: display custom column names in datagrid Pin
Ravindra Sadaphule15-Mar-05 7:12
Ravindra Sadaphule15-Mar-05 7:12 
GeneralWinforms IDE problem Pin
Fragging15-Mar-05 1:37
Fragging15-Mar-05 1:37 
GeneralRe: Winforms IDE problem Pin
Robert Rohde15-Mar-05 6:36
Robert Rohde15-Mar-05 6:36 
GeneralRe: Winforms IDE problem Pin
Ravindra Sadaphule15-Mar-05 7:15
Ravindra Sadaphule15-Mar-05 7:15 
GeneralRe: Winforms IDE problem Pin
Fragging15-Mar-05 7:47
Fragging15-Mar-05 7:47 
QuestionHow to identify user, who runs a certain process? Pin
3Dizard15-Mar-05 1:28
3Dizard15-Mar-05 1:28 
AnswerRe: How to identify user, who runs a certain process? Pin
Scott Serl15-Mar-05 10:34
Scott Serl15-Mar-05 10:34 
You can get this info by using the System.Management namespace functions. I do not have an example in c#, but I have one in vb.net if you are interested.
Basically:

System.Management.ConnectionOptions con = new System.Management.ConnectionOptions;
System.Management.ManagementScope mgmtScope = new System.Management.ManagementScope("\\localhost", con);
System.Management.ObjectQuery objQuery = new System.Management.WqlObjectQuery("SELECT * FROM win32_process");
System.Management.ManagementObjectSearcher objSearch = new Management.ManagementObjectSearcher(mgmtScope, objQuery);
System.Management.ManagementObjectCollection objCol = objSearch.Get;
Object obj;

//Loop through all the processes in objCol to find the one you want.
foreach(System.Management.Object objProc in objCol)
{
//if the obj is the proc you are after
obj = objProc.InvokeMethod("GetOwner",info); //where info is an array look at docs
//I think info[0] is domain and info[1] is user
}

This example code was cobbled together in the message reply editor, and I do not use c# enough to say that these are valid statements, but if you read the documentation on the System.Management objects used, you should be able to figure it out.


Scott Serl
GeneralMobile Application cannot call web service it added as web reference. Pin
Rene Xavier15-Mar-05 1:17
Rene Xavier15-Mar-05 1:17 
GeneralRe: Mobile Application cannot call web service it added as web reference. Pin
Kodanda Pani15-Mar-05 2:36
Kodanda Pani15-Mar-05 2:36 
GeneralRe: Mobile Application cannot call web service it added as web reference. Pin
Rene Xavier15-Mar-05 5:35
Rene Xavier15-Mar-05 5:35 
GeneralRe: Mobile Application cannot call web service it added as web reference. Pin
Kodanda Pani15-Mar-05 17:10
Kodanda Pani15-Mar-05 17:10 
GeneralRe: Mobile Application cannot call web service it added as web reference. Pin
Rene Xavier15-Mar-05 19:17
Rene Xavier15-Mar-05 19:17 
GeneralDisplaying thumbnails Pin
scotlandc15-Mar-05 0:35
scotlandc15-Mar-05 0:35 
GeneralMDI Pin
Member 180361615-Mar-05 0:35
Member 180361615-Mar-05 0:35 
GeneralRe: MDI Pin
itssuk15-Mar-05 5:41
itssuk15-Mar-05 5:41 
GeneralRe: MDI Pin
Member 180361615-Mar-05 17:41
Member 180361615-Mar-05 17:41 
GeneralServices, IPC, COM EXE Servers Pin
vad_kr15-Mar-05 0:20
vad_kr15-Mar-05 0:20 
GeneralRe: Services, IPC, COM EXE Servers Pin
Xiangyang Liu 刘向阳15-Mar-05 0:47
Xiangyang Liu 刘向阳15-Mar-05 0:47 
GeneralInstaller:copying file in specified folder Pin
Adnan Siddiqi14-Mar-05 23:52
Adnan Siddiqi14-Mar-05 23:52 
GeneralRe: Installer:copying file in specified folder Pin
MoustafaS15-Mar-05 9:32
MoustafaS15-Mar-05 9:32 
GeneralRe: Installer:copying file in specified folder Pin
Adnan Siddiqi15-Mar-05 18:06
Adnan Siddiqi15-Mar-05 18:06 
General(Need Help) How to detect the lines from .BMP image into vector Graphics Pin
Kunwar Ashok Singh14-Mar-05 23:23
Kunwar Ashok Singh14-Mar-05 23:23 
General(null) is not a valid win32 app Pin
bwagz14-Mar-05 23:17
bwagz14-Mar-05 23:17 
Questionwhat is best approach for getting performance? Pin
montu337714-Mar-05 22:14
montu337714-Mar-05 22:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.