G
garyusenet
I have had no replies to my previous post so perhaps I didn't write it
good enough.
Please excuse new thread but i wanted to break from the last thread
hopefully this thread will be better.
Very simple. I would like to create listviewitem's for display in a
listview control.
The listview items need to contain properties from Internet Explorer
windows i've managed to collect into an arraylist.
This is the product of many different answers to different questions in
these forums. I dont really understand arraylists but the code is
working now except for the creation of the listview items. I can't seem
to create them. TIA. Gary.
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using SHDocVw;
namespace InternetExplorerInterface
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
ArrayList ar = new ArrayList();
foreach (InternetExplorer ie in new ShellWindows())
{
Int32 iLocation = ie.FullName.IndexOf("iexplore");
if (iLocation >= 0) ar.Add(ie);
}
foreach (InternetExplorer ie in ar)
{
int i = 0;
ListViewItem ("item" + i) = new
ListViewItem(ie.LocationURL, 0);
i++;
}
}
}
}
good enough.
Please excuse new thread but i wanted to break from the last thread
hopefully this thread will be better.
Very simple. I would like to create listviewitem's for display in a
listview control.
The listview items need to contain properties from Internet Explorer
windows i've managed to collect into an arraylist.
This is the product of many different answers to different questions in
these forums. I dont really understand arraylists but the code is
working now except for the creation of the listview items. I can't seem
to create them. TIA. Gary.
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using SHDocVw;
namespace InternetExplorerInterface
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
ArrayList ar = new ArrayList();
foreach (InternetExplorer ie in new ShellWindows())
{
Int32 iLocation = ie.FullName.IndexOf("iexplore");
if (iLocation >= 0) ar.Add(ie);
}
foreach (InternetExplorer ie in ar)
{
int i = 0;
ListViewItem ("item" + i) = new
ListViewItem(ie.LocationURL, 0);
i++;
}
}
}
}