frankito Posted November 18, 2009 Share Posted November 18, 2009 Hi My problem is quite simple i guess. I have just 1 form. First action after form laucnhing is to download a large file. But when script is downloading this files all other control are unreachable on my form (other button) till download is not finished. How could i fix it ? (different thread for download ?) Thanks Link to comment Share on other sites More sharing options...
Authenticity Posted November 18, 2009 Share Posted November 18, 2009 Read InetGet function description. The last parameter specifies whether to wait until downloading is completed (0) or to return immediately and download in the background. Link to comment Share on other sites More sharing options...
frankito Posted November 19, 2009 Author Share Posted November 19, 2009 thanks you very much for your answer, it works. And now i got same question with another function "_INetSmtpMailCom" I send a large file in the background using this function, but until it's not finished i can't do anything. Basicaly i'll have the same problem with a couple of function, like a slow sqlite query, is there a way to start this function in a different thread to not freeze the window? Link to comment Share on other sites More sharing options...
Authenticity Posted November 19, 2009 Share Posted November 19, 2009 Nope, these procedures are executed in your thread and not like InetGet which is executed in another thread. You can execute them in another process though, you can register your own message using _WinAPI_RegisterWindowMessage with your generated GUID or something and execute these tasks in another process and when the other processes finished their execution they can broadcast this message to your window to notify about the results. Much like process communication. If you require to share information which may be based on pointer like strings or structures, you should look into $WM_COPYDATA. Search the example forums. Link to comment Share on other sites More sharing options...
frankito Posted November 19, 2009 Author Share Posted November 19, 2009 thanks again Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now