Click here to Skip to main content
15,911,360 members
Home / Discussions / C#
   

C#

 
GeneralTextBox get focus always Pin
jason_mf8-Jan-08 14:46
jason_mf8-Jan-08 14:46 
GeneralRe: TextBox get focus always Pin
Paul Conrad8-Jan-08 17:29
professionalPaul Conrad8-Jan-08 17:29 
QuestionTrace implementation for static methods. Pin
Ilia Blank8-Jan-08 10:55
Ilia Blank8-Jan-08 10:55 
GeneralWeb Browser Control Pin
A.Asif8-Jan-08 10:41
A.Asif8-Jan-08 10:41 
General[Message Deleted] Pin
Marutar8-Jan-08 10:35
Marutar8-Jan-08 10:35 
GeneralRe: WMI in C#? Pin
ekynox8-Jan-08 18:11
ekynox8-Jan-08 18:11 
GeneralRe: WMI in C#? Pin
Marutar9-Jan-08 3:30
Marutar9-Jan-08 3:30 
GeneralRe: WMI in C#? Pin
ekynox9-Jan-08 9:56
ekynox9-Jan-08 9:56 
try this. I got the code snippet from the code generator itself. However, makesure you know which Win32_Process.Handle you want t10execute GetOwner on. In the code snippet its tied to 1076.

using System;
using System.Management;
using System.Windows.Forms;

namespace WMISample
{
public class CallWMIMethod
{
public static void Main()
{
try
{
ManagementObject classInstance =
new ManagementObject("root\\CIMV2",
"Win32_Process.Handle='1076'",
null);

// no method in-parameters to define


// Execute the method and obtain the return values.
ManagementBaseObject outParams =
classInstance.InvokeMethod("GetOwner", null, null);

// List outParams
Console.WriteLine("Out parameters:");
Console.WriteLine("Domain: " + outParams["Domain"]);
Console.WriteLine("ReturnValue: " + outParams["ReturnValue"]);
Console.WriteLine("User: " + outParams["User"]);
}
catch(ManagementException err)
{
MessageBox.Show("An error occurred while trying to execute the WMI method: " + err.Message);
}
}
}
}
GeneralWhy i am getting MessageBox twice Pin
netJP12L8-Jan-08 9:30
netJP12L8-Jan-08 9:30 
GeneralRe: Why i am getting MessageBox twice Pin
Christian Graus8-Jan-08 9:51
protectorChristian Graus8-Jan-08 9:51 
GeneralRe: Why i am getting MessageBox twice Pin
netJP12L8-Jan-08 10:52
netJP12L8-Jan-08 10:52 
GeneralRe: Why i am getting MessageBox twice Pin
Skippums8-Jan-08 11:18
Skippums8-Jan-08 11:18 
GeneralRe: Why i am getting MessageBox twice Pin
netJP12L8-Jan-08 16:19
netJP12L8-Jan-08 16:19 
GeneralRe: Why i am getting MessageBox twice Pin
PIEBALDconsult8-Jan-08 9:52
mvePIEBALDconsult8-Jan-08 9:52 
GeneralRe: Why i am getting MessageBox twice Pin
visualhint11-Jan-08 4:07
visualhint11-Jan-08 4:07 
General[C#.net] Connection on data base sqlserver Pin
abbd8-Jan-08 8:32
abbd8-Jan-08 8:32 
GeneralRe: [C#.net] Connection on data base sqlserver Pin
J4amieC8-Jan-08 8:58
J4amieC8-Jan-08 8:58 
GeneralRe: [C#.net] Connection on data base sqlserver Pin
Colin Angus Mackay8-Jan-08 9:06
Colin Angus Mackay8-Jan-08 9:06 
GeneralRe: [C#.net] Connection on data base sqlserver Pin
Ennis Ray Lynch, Jr.8-Jan-08 9:29
Ennis Ray Lynch, Jr.8-Jan-08 9:29 
Question.axpx+javascript ? Pin
simworld8-Jan-08 8:24
simworld8-Jan-08 8:24 
AnswerRe: .axpx+javascript ? Pin
Christian Graus8-Jan-08 9:13
protectorChristian Graus8-Jan-08 9:13 
AnswerRe: .axpx+javascript ? Pin
Ennis Ray Lynch, Jr.8-Jan-08 9:32
Ennis Ray Lynch, Jr.8-Jan-08 9:32 
GeneralCustom Xml Serialization Pin
Skippums8-Jan-08 8:09
Skippums8-Jan-08 8:09 
GeneralRe: Custom Xml Serialization Pin
Ennis Ray Lynch, Jr.8-Jan-08 8:39
Ennis Ray Lynch, Jr.8-Jan-08 8:39 
QuestionRe: Custom Xml Serialization Pin
Skippums8-Jan-08 10:07
Skippums8-Jan-08 10:07 

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.