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. Windows Forms
  4. My endless loop blocks my GUI !!

My endless loop blocks my GUI !!

Scheduled Pinned Locked Moved Windows Forms
c++helpcsharpwinformssysadmin
11 Posts 5 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.
  • V Offline
    V Offline
    vidasco
    wrote on last edited by
    #1

    I'm developping a WinSock Server in Visual C++ with Winforms and got problem when the server start to accept clients : the server still working but the form display blocks and i cannot click on any control; I think the endless loop that accept every client block the display !! I need your help :)

    R D 2 Replies Last reply
    0
    • V vidasco

      I'm developping a WinSock Server in Visual C++ with Winforms and got problem when the server start to accept clients : the server still working but the form display blocks and i cannot click on any control; I think the endless loop that accept every client block the display !! I need your help :)

      R Offline
      R Offline
      RichardM1
      wrote on last edited by
      #2

      Make a background thread for servicing WinSock.

      Opacity, the new Transparency.

      1 Reply Last reply
      0
      • V vidasco

        I'm developping a WinSock Server in Visual C++ with Winforms and got problem when the server start to accept clients : the server still working but the form display blocks and i cannot click on any control; I think the endless loop that accept every client block the display !! I need your help :)

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        Move your WinSock listener to a background thread and this will free the UI thread to handle the UI stuff.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007, 2008
        But no longer in 2009...

        V 1 Reply Last reply
        0
        • D Dave Kreskowiak

          Move your WinSock listener to a background thread and this will free the UI thread to handle the UI stuff.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007, 2008
          But no longer in 2009...

          V Offline
          V Offline
          vidasco
          wrote on last edited by
          #4

          Thanks for ur answer I'm a Beginner in GUI programming and i don't know how to implement multi-thread code... could you be gentle guiding me, I love CodeProject.com !!! Hehehehe Thanks a lot !!

          D W 2 Replies Last reply
          0
          • V vidasco

            Thanks for ur answer I'm a Beginner in GUI programming and i don't know how to implement multi-thread code... could you be gentle guiding me, I love CodeProject.com !!! Hehehehe Thanks a lot !!

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            There is no "simple" guide to multi-threaded coding. You just have to do a bunch of research on the subject, write little test apps to verify what you're thinking is correct, and teach yourself this stuff. I can't tell you how to do threading is a forum post. There's just too much information. Start reading here[^]...

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                 2006, 2007, 2008
            But no longer in 2009...

            V 1 Reply Last reply
            0
            • D Dave Kreskowiak

              There is no "simple" guide to multi-threaded coding. You just have to do a bunch of research on the subject, write little test apps to verify what you're thinking is correct, and teach yourself this stuff. I can't tell you how to do threading is a forum post. There's just too much information. Start reading here[^]...

              A guide to posting questions on CodeProject[^]
              Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                   2006, 2007, 2008
              But no longer in 2009...

              V Offline
              V Offline
              vidasco
              wrote on last edited by
              #6

              thank u verry much !!

              RaviBeeR 1 Reply Last reply
              0
              • V vidasco

                thank u verry much !!

                RaviBeeR Offline
                RaviBeeR Offline
                RaviBee
                wrote on last edited by
                #7

                See this[^] tutorial. /ravi

                My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

                V 1 Reply Last reply
                0
                • RaviBeeR RaviBee

                  See this[^] tutorial. /ravi

                  My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

                  V Offline
                  V Offline
                  vidasco
                  wrote on last edited by
                  #8

                  I'm lucky to be CodeProject membre!! :-D I thank for this tuto it was what i'm looking for !! thannnnnnnnnnnnnnnnnnnnnx.

                  RaviBeeR 1 Reply Last reply
                  0
                  • V vidasco

                    I'm lucky to be CodeProject membre!! :-D I thank for this tuto it was what i'm looking for !! thannnnnnnnnnnnnnnnnnnnnx.

                    RaviBeeR Offline
                    RaviBeeR Offline
                    RaviBee
                    wrote on last edited by
                    #9

                    You're welcome!  Feel free to vote up the answer if you think it's useful.  :) /ravi

                    My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

                    1 Reply Last reply
                    0
                    • V vidasco

                      Thanks for ur answer I'm a Beginner in GUI programming and i don't know how to implement multi-thread code... could you be gentle guiding me, I love CodeProject.com !!! Hehehehe Thanks a lot !!

                      W Offline
                      W Offline
                      wknopf
                      wrote on last edited by
                      #10

                      Open the MSDN Library and check BackgroundWorker, there are good examples there. We are here to help, not to teach.

                      V 1 Reply Last reply
                      0
                      • W wknopf

                        Open the MSDN Library and check BackgroundWorker, there are good examples there. We are here to help, not to teach.

                        V Offline
                        V Offline
                        vidasco
                        wrote on last edited by
                        #11

                        Yes Sir !!! :-D

                        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