Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Refresh a form in C++ Builder

Refresh a form in C++ Builder

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorial
15 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D David Crow

    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

    D Offline
    D Offline
    David21u2
    wrote on last edited by
    #5

    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

    D 1 Reply Last reply
    0
    • D David21u2

      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

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #6

      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

      D 1 Reply Last reply
      0
      • D David Crow

        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

        D Offline
        D Offline
        David21u2
        wrote on last edited by
        #7

        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

        D 1 Reply Last reply
        0
        • D David21u2

          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

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #8

          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

          D 1 Reply Last reply
          0
          • D David Crow

            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

            D Offline
            D Offline
            David Gonzalez G
            wrote on last edited by
            #9

            tks a lot for your help...I'm gonna go over that inmediately... c u around.. dg

            1 Reply Last reply
            0
            • D David21u2

              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

              F Offline
              F Offline
              favorxx
              wrote on last edited by
              #10

              maybe your frequent refresh leads to the frosen, try to create a thread to refresh :)

              D 1 Reply Last reply
              0
              • F favorxx

                maybe your frequent refresh leads to the frosen, try to create a thread to refresh :)

                D Offline
                D Offline
                David Gonzalez G
                wrote on last edited by
                #11

                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

                F 1 Reply Last reply
                0
                • D David Gonzalez G

                  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

                  F Offline
                  F Offline
                  favorxx
                  wrote on last edited by
                  #12

                  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.

                  F 1 Reply Last reply
                  0
                  • F favorxx

                    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.

                    F Offline
                    F Offline
                    favorxx
                    wrote on last edited by
                    #13

                    another good article for you Threads with MFC[^]

                    D 1 Reply Last reply
                    0
                    • F favorxx

                      another good article for you Threads with MFC[^]

                      D Offline
                      D Offline
                      David Gonzalez G
                      wrote on last edited by
                      #14

                      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...

                      F 1 Reply Last reply
                      0
                      • D David Gonzalez G

                        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...

                        F Offline
                        F Offline
                        favorxx
                        wrote on last edited by
                        #15

                        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

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups