Click here to Skip to main content
15,921,959 members
Home / Discussions / C#
   

C#

 
AnswerRe: Closing a form and enable another one! Pin
Nicholas Butler23-Feb-06 5:18
sitebuilderNicholas Butler23-Feb-06 5:18 
GeneralRe: Closing a form and enable another one! Pin
alee15.10.8823-Feb-06 20:43
alee15.10.8823-Feb-06 20:43 
QuestionReading and writing to text file simultaneously Pin
liqnit23-Feb-06 3:39
liqnit23-Feb-06 3:39 
AnswerRe: Reading and writing to text file simultaneously Pin
yoaz23-Feb-06 10:00
yoaz23-Feb-06 10:00 
QuestionConvert an Image Pointer Into a Bitmap Pin
redfish3423-Feb-06 3:22
redfish3423-Feb-06 3:22 
AnswerRe: Convert an Image Pointer Into a Bitmap Pin
Nicholas Butler23-Feb-06 3:40
sitebuilderNicholas Butler23-Feb-06 3:40 
GeneralRe: Convert an Image Pointer Into a Bitmap Pin
redfish3425-Feb-06 3:24
redfish3425-Feb-06 3:24 
QuestionWMI Exceptions/Updating List View Pin
autekre23-Feb-06 3:20
autekre23-Feb-06 3:20 
I've only just started with c# so these are probably stupid questions.

1. Why is it displaying certain information (for example CommandLine from Win32_Process) throws up a NullReferenceException, yet other information from the same collection works fine and how would I go about avoiding this (ie; actually getting the information rather than just handling the exception,) I'm displaying the information in a list view fwiw, using

foreach (ManagementObject MO in processQueryCollection)
{
ListViewItem processItem = new ListViewItem(MO["Whatever"].ToString());
processItem.SubItems.Add(MO["Whatever"].ToString() + " Bytes");
......
lstProcesses.Items.AddRange(new ListViewItem[] {processItem})
}

You get the idea.

2. What would be the best way to update the list view on a timer event ? I've got the timer working but obviously if I call the method that contains the above code it replicates the data, adding new columns and rows rather than updating the existing data and if I call a clear method it ends up looking very strange.

TIA.
AnswerRe: WMI Exceptions/Updating List View Pin
Praveen Nayak23-Feb-06 19:00
Praveen Nayak23-Feb-06 19:00 
Questionpublic variables Pin
ddpn4223-Feb-06 3:08
ddpn4223-Feb-06 3:08 
AnswerRe: public variables Pin
Le centriste23-Feb-06 3:25
Le centriste23-Feb-06 3:25 
GeneralRe: public variables Pin
ddpn4223-Feb-06 14:22
ddpn4223-Feb-06 14:22 
GeneralRe: public variables Pin
Praveen Nayak23-Feb-06 19:09
Praveen Nayak23-Feb-06 19:09 
GeneralRe: public variables Pin
Le centriste24-Feb-06 1:54
Le centriste24-Feb-06 1:54 
AnswerRe: public variables Pin
StyleGuide23-Feb-06 3:33
StyleGuide23-Feb-06 3:33 
QuestionTransparent Label in Compact Framework? Pin
rnvrnv23-Feb-06 3:08
rnvrnv23-Feb-06 3:08 
Questionhow to check if client still connected to server Pin
batmanAgen23-Feb-06 2:57
batmanAgen23-Feb-06 2:57 
AnswerRe: how to check if client still connected to server Pin
Praveen Nayak23-Feb-06 19:19
Praveen Nayak23-Feb-06 19:19 
GeneralRe: how to check if client still connected to server Pin
batmanAgen23-Feb-06 21:01
batmanAgen23-Feb-06 21:01 
QuestionMicrosoft.DirectX.AudioVideoPlayback.Video Pin
kaka2223-Feb-06 2:12
kaka2223-Feb-06 2:12 
QuestionConstructor overloading Pin
spin vector23-Feb-06 1:56
spin vector23-Feb-06 1:56 
AnswerRe: Constructor overloading Pin
Nicholas Butler23-Feb-06 2:03
sitebuilderNicholas Butler23-Feb-06 2:03 
GeneralRe: Constructor overloading Pin
spin vector23-Feb-06 2:33
spin vector23-Feb-06 2:33 
AnswerRe: Constructor overloading Pin
Guffa23-Feb-06 2:42
Guffa23-Feb-06 2:42 
AnswerRe: Constructor overloading Pin
Nicholas Butler23-Feb-06 2:43
sitebuilderNicholas Butler23-Feb-06 2:43 

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.