And thanks for all the help I have recived here !
Hope you guys can help me with another "problem"
I have created many tabsheets on a pagecontrol at runtime.
Now I want to delete them with a selection on a popupmenu.
I tried this code:
procedure TForm1.Logoffallsessions1Click(Sender: TObject);
for f:=0 to pagecontrol1.pagecount-1 do
but it ends with a error message.
I have tried to switch to another tab/page before freeing it, but that will not work when there are only one page left to close/free.