Refresh a form in C++ Builder
-
I can not refresh the forms of my application when I execute the .exe file. Whether I click over my application then the screen seens to be frozen...same result if I do soemthing with another application like web browser...I've tried with refresh() and bringtofront() methods but it doesn't work. I would really apreciate if someone could tell me how to keep the forms updated when it is running... c u soon... David
-
I can not refresh the forms of my application when I execute the .exe file. Whether I click over my application then the screen seens to be frozen...same result if I do soemthing with another application like web browser...I've tried with refresh() and bringtofront() methods but it doesn't work. I would really apreciate if someone could tell me how to keep the forms updated when it is running... c u soon... David
David21u2 wrote:
I would really apreciate if someone could tell me how to keep the forms updated when it is running...
How did you initially populate them?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
-
David21u2 wrote:
I would really apreciate if someone could tell me how to keep the forms updated when it is running...
How did you initially populate them?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
Hi, Thanks a lot for your help... My issue is the following...when I'm running the .exe file... any further action I do with the mouse, lets say open another application or even click over my application cause that the screen gets frozen...i've added refresh() and Bringtofront() methods but they only work whether I run the application from the Builder IDE... tks in advance for your help... dg
-
Hi, Thanks a lot for your help... My issue is the following...when I'm running the .exe file... any further action I do with the mouse, lets say open another application or even click over my application cause that the screen gets frozen...i've added refresh() and Bringtofront() methods but they only work whether I run the application from the Builder IDE... tks in advance for your help... dg
David21u2 wrote:
...cause that the screen gets frozen...
Instead of what? Is your application doing something at that point?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
-
David21u2 wrote:
...cause that the screen gets frozen...
Instead of what? Is your application doing something at that point?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
Yeah, The application is a cellular networks simulator; some simulations are really heavy computationally speaking that the system I think is unable to refresh the graphical interface...but the curious thing is that only the app's screen gets frozen because the simulation itself keeps working properly; I've verified it because once the overall simulation process finishes then the application screen returns. I've viewed some articles refering to threads but I have no idea how to use them...maybe there is another way !! c u, dg
-
Yeah, The application is a cellular networks simulator; some simulations are really heavy computationally speaking that the system I think is unable to refresh the graphical interface...but the curious thing is that only the app's screen gets frozen because the simulation itself keeps working properly; I've verified it because once the overall simulation process finishes then the application screen returns. I've viewed some articles refering to threads but I have no idea how to use them...maybe there is another way !! c u, dg
David21u2 wrote:
...some simulations are really heavy computationally speaking that the system I think is unable to refresh the graphical interface...I've verified it because once the overall simulation process finishes then the application screen returns.
Put these computations into a worker thread.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
-
David21u2 wrote:
...some simulations are really heavy computationally speaking that the system I think is unable to refresh the graphical interface...I've verified it because once the overall simulation process finishes then the application screen returns.
Put these computations into a worker thread.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
-
well, could you give me please additional insight how to do that...i've never use such threads so a tutorial or maybe a sample file could be useful... : ) tks dg
See here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
-
See here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
tks a lot for your help...I'm gonna go over that inmediately... c u around.. dg
-
Hi, Thanks a lot for your help... My issue is the following...when I'm running the .exe file... any further action I do with the mouse, lets say open another application or even click over my application cause that the screen gets frozen...i've added refresh() and Bringtofront() methods but they only work whether I run the application from the Builder IDE... tks in advance for your help... dg
-
hi, do ou have a sample code showing how to do that... I've never used threads and I found it a bit complicated... well, tks a lot for your help... c u around, dg
-
hi, do ou have a sample code showing how to do that... I've never used threads and I found it a bit complicated... well, tks a lot for your help... c u around, dg
-
Multithreading Tutorial[^] you can download the code here,although it isn't in c++ builder. It is written by api, hope it helpful. anyway, i think the code in msdn is also valuable.
-
another good article for you Threads with MFC[^]
Hi, I dont know whether there are some issues implementing threads by means of MFC in Borland C++ Builder. I have found some problems with CWinThread class in Builder... have you some additional comments regarding it ? tks a lot for your help...
-
Hi, I dont know whether there are some issues implementing threads by means of MFC in Borland C++ Builder. I have found some problems with CWinThread class in Builder... have you some additional comments regarding it ? tks a lot for your help...
MFC is a part of Visual C++, not for C++ builder, maybe the idea is useful. If you do not want to use api or read codes in visual c++, please use TThread in c++ builder. there is an example contained in c++ builder D:\Program Files\Borland\CBuilder6\Examples\Apps\Threads you can file->new->others->thread object to create a new thread, See more in help file of TThread