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();
}
}
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();
}
}