Close MessageBox automaticly
-
Hello, Is it possible to close a messageBox automaticly after few seconds? Any one can help me? :doh: Thanks PC
-
Hello, Is it possible to close a messageBox automaticly after few seconds? Any one can help me? :doh: Thanks PC
Your best bet is just to write your own messagebox that does this.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
Your best bet is just to write your own messagebox that does this.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
Let me try to explain the my problem with my bad english... I have an aplication that runs a process in background and i was forced to stop the execution of the aplication until this process is complete, but this process could long for large seconds. So i must have a way to warn the user to wait, i thougt in a messageBox , and i do it, but than this messageBox stays until the user clicks ok, not until the end of the process. I have tried with a form but it does not work to well. The form stays full of holes (the places where it should load the labels). Could you sugest me other solution or a way to solve the problem with the form? thanks for your help. :confused: PC
-
Let me try to explain the my problem with my bad english... I have an aplication that runs a process in background and i was forced to stop the execution of the aplication until this process is complete, but this process could long for large seconds. So i must have a way to warn the user to wait, i thougt in a messageBox , and i do it, but than this messageBox stays until the user clicks ok, not until the end of the process. I have tried with a form but it does not work to well. The form stays full of holes (the places where it should load the labels). Could you sugest me other solution or a way to solve the problem with the form? thanks for your help. :confused: PC
So you're using two seperate threads. Using the other thread (not the background one) create a timer that will tick after say a minute. When it ticks check to see if the background thread is still running. If it's still running show the messagebox. Even when the box is open the other thread will still run.
-
Let me try to explain the my problem with my bad english... I have an aplication that runs a process in background and i was forced to stop the execution of the aplication until this process is complete, but this process could long for large seconds. So i must have a way to warn the user to wait, i thougt in a messageBox , and i do it, but than this messageBox stays until the user clicks ok, not until the end of the process. I have tried with a form but it does not work to well. The form stays full of holes (the places where it should load the labels). Could you sugest me other solution or a way to solve the problem with the form? thanks for your help. :confused: PC
May I humbly suggest my http://www.codeproject.com/KB/cs/PIEBALDProgressDialog.aspx[^]
-
So you're using two seperate threads. Using the other thread (not the background one) create a timer that will tick after say a minute. When it ticks check to see if the background thread is still running. If it's still running show the messagebox. Even when the box is open the other thread will still run.
Yes, you are rigth i'm following your advice, but it still not perfect because if the thread that runs in background ends, and the user dont press OK before, i will have the messageBox in the screen but the program its already in another fase (since its a caind of Wizard). But i think i must live with that because i don“t find a better answer. Perhaps i should follow your 1st advice and built my one class for the messageBox. Thanks for the help :) PC
-
May I humbly suggest my http://www.codeproject.com/KB/cs/PIEBALDProgressDialog.aspx[^]
-
Hello, Is it possible to close a messageBox automaticly after few seconds? Any one can help me? :doh: Thanks PC
-
One way is to create your own form with an OnTimer event. The form can be just a label that you assign text to prior to showing it. Then the OnTimer event can call this.close();