Re: Saving Tab Control State on application exit
Hi Cjards,
you have multiple open tabs in the tab control but one active one as you have said, the purpose was the save the state of the application on exit.
So if the user has 5 open tabs and closes the application, When the application is next loaded, I want those same tabs to load with it.
One further slightly unrelated issue,
Can you use the foreach loop with a combobox?
Ive been trying but cant get it to work
Code:
foreach(Item? in combobox.Items)
{
Do Stuff
}
Thanks
Rich...
Re: Saving Tab Control State on application exit
Code:
For Each itm As Object In ComboBox1.Items
MessageBox.Show(itm.ToString())
Next
Re: Saving Tab Control State on application exit
Quote:
Originally Posted by crackersixx
Code:
For Each itm As Object In ComboBox1.Items
MessageBox.Show(itm.ToString())
Next
I think that this is visual basic for .net.
The c# format is something like this:
Code:
string fooStr = "";
foreach (object myItem in comboBox1.Items)
{
fooStr += myItem.ToString() + Environment.NewLine;
}
MessageBox.Show(fooStr);
If you need to use the items in a more specific way, you will need to cast them first:
Code:
((myObject).myItem).myObjectMethod();