[Help] Filling ListView with process information [solved]

Posts 1–13 of 13 · Page 1 of 1
[Help] Filling ListView with process information [solved]
Code:
For Each p In Process.GetProcesses(My.Computer.Name)
Dim Count as integer = 0            
            ListView1.Items.Clear()
            ListView1.Items.Add(p.ProcessName)
            ListView1.Items.SubItems.Add(p.Responding)
        Next
I'm using that code but when the form load it just show 1 process..
Erm
You're clearing the Listview each time you loop
Well I try to remove that but still dotn work xD
Code:
Dim currProcess() As Process = Process.GetProcesses
        For Each p As Process In currProcess
            ListView1.Items.Add(p.ProcessName)
        Next
btw, How'd you get Subitems working? I get an error when i try that O-o
U have to edit the listview, also How I make this work.

Code:
TabControl1.TabPages.Add("New Tab")
        CType(TabControl1.TabPages(Web)
I ger an error On the Web
(Web is a NewWebrowser)
Quote Originally Posted by alvaritos View Post
U have to edit the listview, also How I make this work.

Code:
TabControl1.TabPages.Add("New Tab")
        CType(TabControl1.TabPages(Web)
I ger an error On the Web
(Web is a NewWebrowser)
Tabpages don't work like that.

TabControl1.TabPages(Index) -> Gives you the tabpage at the requested index.(Starting from 0)

Here's something that might satisfy your needs:

Code:
        Dim wbNew As New WebBrowser
        TabControl1.TabPages.Add("New tab")
        TabControl1.TabPages(TabControl1.TabPages.Count - 1).Controls.Add(wbNew)
        wbNew.Dock = DockStyle.Fill
it's not perfect but will get you going.
Try something like this (off the top of my head so there may be syntax errors, whatever)

[highlight=vb.net]
For each p As Process In Process.GetProcesses
ListView1.items.add(p.ProcessName).SubItems.Add(p. Responding)
Next
[/highlight]

Let me know.
Well Jason It works but I did some changes also thanks!
Sort
@Jason Good Job on minion you deserve it(better late then never)
and close tis please.
Why should he close it.
The OP has more questions and I appreciate it that he doesn't spam the forum with new topics.
Solved thanks
How do you mean put it correctly?
Marked as solved but if you could elaborate on your answer that would be .

Anyways, it's late I'm going to bed. /wave
Posts 1–13 of 13 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Talk with us