Create a Form, add a combobox in it, then paste :
private void Form1_Load(object sender, EventArgs e)
{
TimeZoneInfo myZome = TimeZoneInfo.Local;
comboBox1.DataSource = TimeZoneInfo.GetSystemTimeZones();
comboBox1.SelectedItem = myZome;
}
ComboBox will display only the first element, it does not care about selectedItem…
this driving me nuts
any help please ?
Thanks in advance
Fred
The instance of your timezone object (myZome) is not in the zones list.
Find the right one in the collection.
Try this: