Click here to Skip to main content
15,903,388 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to provide default implementations? Pin
peterchen28-Nov-05 20:13
peterchen28-Nov-05 20:13 
AnswerRe: How to provide default implementations? Pin
Leslie Sanford28-Nov-05 12:51
Leslie Sanford28-Nov-05 12:51 
Questioncoordinates of mouse on picturebox Pin
haytham_mohammad28-Nov-05 12:12
haytham_mohammad28-Nov-05 12:12 
AnswerRe: coordinates of mouse on picturebox Pin
Christian Graus28-Nov-05 12:13
protectorChristian Graus28-Nov-05 12:13 
GeneralRe: coordinates of mouse on picturebox Pin
haytham_mohammad28-Nov-05 13:40
haytham_mohammad28-Nov-05 13:40 
GeneralRe: coordinates of mouse on picturebox Pin
Christian Graus28-Nov-05 13:43
protectorChristian Graus28-Nov-05 13:43 
QuestionI got a list of processes in a list box, how do i get rid of the 'System.Diagno...' part? Pin
Anthony Mushrow28-Nov-05 11:59
professionalAnthony Mushrow28-Nov-05 11:59 
AnswerRe: I got a list of processes in a list box, how do i get rid of the 'System.Diagno...' part? Pin
Curtis Schlak.28-Nov-05 12:41
Curtis Schlak.28-Nov-05 12:41 
Define the following in your project:
public struct ProcessWrapper
{
  public ProcessWrapper( Process process ) { p = process; }
  public Process p;
  public override string ToString() { return p.ProcessName; }
}
Now, when you add items to your ListBox, just do the following:
listBox.Add( new ProcessWrapper( p ) );
and everything should look the correct way. Later, in your code, you can do the following:
foreach( ProcessWrapper pw in listbox.SelectedItems )
{
  pw.p.Kill();
}
That should take care of your needs.

DISCLAIMER: The struct ProcessWrapper does not implement recommended data member hiding and the like. This is really more for your convenience so I did not go into it.

"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
QuestionHow to "%04i" in C#? Pin
peterchen28-Nov-05 11:57
peterchen28-Nov-05 11:57 
AnswerRe: How to "%04i" in C#? Pin
Christian Graus28-Nov-05 12:15
protectorChristian Graus28-Nov-05 12:15 
GeneralRe: How to "%04i" in C#? Pin
peterchen28-Nov-05 12:17
peterchen28-Nov-05 12:17 
GeneralRe: How to "%04i" in C#? Pin
Christian Graus28-Nov-05 12:18
protectorChristian Graus28-Nov-05 12:18 
QuestionConnecting to MSDE with Visual studio C# Pin
kourvoisier28-Nov-05 11:43
kourvoisier28-Nov-05 11:43 
AnswerRe: Connecting to MSDE with Visual studio C# Pin
Christian Graus28-Nov-05 12:16
protectorChristian Graus28-Nov-05 12:16 
QuestionPassing a struct from c# to c in vs.net Pin
spellman28-Nov-05 11:14
spellman28-Nov-05 11:14 
QuestionIs there any other way to open a web page than Process.Start? Pin
Anthony Mushrow28-Nov-05 11:05
professionalAnthony Mushrow28-Nov-05 11:05 
Questionwindows default currency symbol Pin
Shahin7728-Nov-05 10:55
Shahin7728-Nov-05 10:55 
AnswerRe: windows default currency symbol Pin
leppie28-Nov-05 12:35
leppie28-Nov-05 12:35 
QuestionNull Reference Exception COM Objects Pin
thepolishguy28-Nov-05 10:34
thepolishguy28-Nov-05 10:34 
QuestionExtracting user's password for alternate authentication Pin
tantiboh28-Nov-05 10:18
tantiboh28-Nov-05 10:18 
AnswerRe: Extracting user's password for alternate authentication Pin
Colin Angus Mackay28-Nov-05 11:13
Colin Angus Mackay28-Nov-05 11:13 
QuestionText Colors and Outline Pin
Pende28-Nov-05 10:12
Pende28-Nov-05 10:12 
AnswerRe: Text Colors and Outline Pin
Christian Graus28-Nov-05 10:35
protectorChristian Graus28-Nov-05 10:35 
QuestionConditional compilation for 1.1 and 2.0 Pin
Roger Alsing28-Nov-05 9:58
Roger Alsing28-Nov-05 9:58 
AnswerRe: Conditional compilation for 1.1 and 2.0 Pin
Mark DeVol29-Nov-05 11:15
Mark DeVol29-Nov-05 11:15 

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.