C#.Net Bug

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • crazenator
    New Member
    • Jul 2008
    • 2

    C#.Net Bug

    Hello dears, I have made an application that can sends messages to multiple clients at a single send. It can also send message for a single user as well. When my remote application receives message, I am displaying a form and the rest of communication between the hosts will take place through their new windows. Problem is that when I receive message and open the form, the newly created form seems to be busy all the time. It's receiving my message but the window is white as if it's busy in some thing. Please help me regarding this problem
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Moved to .NET forum.

    Comment

    • IanWright
      New Member
      • Jan 2008
      • 179

      #3
      Sounds like your main GUI thread is busy... The main thread you have updates the user interface and handles windows messages. You need to ensure that it is left free (not tied up in waiting for user input etc.)

      You should do this by listening for network data within a separate listening thread, and then your windows should update correctly.

      Comment

      • crazenator
        New Member
        • Jul 2008
        • 2

        #4
        sir, i am using asynchronous communication methods for receiving

        Comment

        • IanWright
          New Member
          • Jan 2008
          • 179

          #5
          Originally posted by crazenator
          sir, i am using asynchronous communication methods for receiving
          Maybe you could post some example code for us so we can see exactly what you've got?

          Comment

          • Plater
            Recognized Expert Expert
            • Apr 2007
            • 7872

            #6
            If you opened the window up in a new thread, it will remain white because it does not get the windows messages.
            If not, then your GUI thread itself is busy doing something.
            Application.DoE vents() usually helps.

            Comment

            Working...