Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

c# NetworkBrowser() in Delphi

Status
Not open for further replies.

Nejibg

Programmer
Apr 4, 2008
16
GB
Hi all,
Does anyone know the equivalent to this c# code in Delphi?
Thanks in advance.
N.

private void frmMain_Load(object sender, EventArgs e)
{
//create a new NetworkBrowser object, and get the
//list of network computers it found, and add each
//entry to the combo box on this form
try
{
NetworkBrowser nb = new NetworkBrowser();
foreach (string pc in nb.getNetworkComputers())
{
cmbNetworkComputers.Items.Add(pc);
listBox1.Items.Add(pc);
}
}
catch (Exception ex) {
MessageBox.Show("An error occurred trying to access the network computers", "error",
MessageBoxButtons.OK, MessageBoxIcon.Error);
Application.Exit();
}

}
 
Jedi has several dialogs including network browsers. You could pull the code from there.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top