Hi, I wrote a small application with a very simple interface : a TForm, an Indy TCPServer and a PageControl without any Tabsheet on it.
The tabsheets are dinamically created while different TCPClients initiate contacts with my TCPServer. Every Tabsheet displays in it's caption the IP of the Client and it also contains a TMemo that shows the data received from the client. The code used to create a TabSheet looks like this : FTabSheet := TTabSheet.Create(nil); FTabSheet.PageControl := PC; // PC is the pagecontrol. It is not so important what my program does with the received data(it tries to send it to a Cash Register). When the client closes the connection, then TabSheet is destroyed. So far, so good. Everything works fine until I run my application hidden in the System Tray : So, the first TCP client connects to my server, puts some data and, when my program sends back an Ok flag that the data was processed, the connection is closed and the TabSheet coresponding to this client is destroyed. This is the moment when the problems begin. When the next connection is initiated the program crashes at the line : FTabSheet.PageControl := PC with the eroor message : EListError , failed to set object at Index 0. If I make my form visible, I have the surprise to see that the PageControl is not visible anymore, even the debugger shows me that ALL it's properties are ok. I don't have this problem if I run my application in the SystemTray but making the form visible or if I run it minimized in the Task Bar. Any idea ? Gabriel -- WinMENTOR Team (http://www.winmentor.ro) __________________________________________________ Delphi-Talk mailing list -> Delphi-Talk@elists.org http://www.elists.org/mailman/listinfo/delphi-talk