Hello asvetov, This is normal behaviour in windows. If you create a (hidden) window in a thread you must pump messages or your system can deadlock. If you suspend a thread having a window then it cannot pump, so that is what you experiance.
--- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz Friday, February 17, 2006, 19:36, asvetov wrote: > Hello all! > Does somebody have this problem: if twsocket is created in thread > and the thread goes to suspend mode, than if you try to call i.e. > explorer thru shellexecute, the whole applications hangs some minutes. > I assume it has something todo with Window Handle Allocation in > TWSocket, but not sure. As for my application, it's not essential, > since I can find some alternatives to shellexecute. But! It's seems to > be, that the shell operations of whole windows is blocked - and this > is the problem. What I mean: i.e. if you try to click on url in an > email, IE will not be started - in hangs, if you try to put your PC in > standby mode - it hangs... etc. etc. > You can, I hope, easily reproduce this behaviour i.e. with > ftpthrd.dpr from ICS distribution. > 1. Just add in procedure TTransferThread.Execute (ftpthrd1.pas) one line - > see code below > procedure TTransferThread.Execute; > var > FtpClient1 : TFtpClient; > begin > FtpClient1 := TFtpClient.Create(nil); > // just add below line: Suspend; > Suspend; > .... > .... > 2. put one more button on the form and add shellapi to uses > procedure TThrdFtpForm.Button1Click(Sender: TObject); > begin > ShellExecute(Application.Handle, 'explore', 'd:\', nil, nil, > SW_SHOWNORMAL); > end; > 3. Click Start (FTPclient will be created, of course twsocket too) > and than click on button which call shellexecute > you will see what I described above. > Thanks for any help & best regards, A.Svetov -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be