Results 1 to 7 of 7

Thread: Form closing problem

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2003
    Posts
    227

    Form closing problem

    when i click close in my program , it takes some 30-40 seconds before it closes ( the program is close but vb still shows the program in running mode ) , is that something normal for big programs or its a result of bad programming? what should i do?!

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Do you have any finalization code under Close button ? and also what's the nature of your proj ? I mean does it do some kind of graphics stuff and are there many controls on it ?

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 2003
    Posts
    227
    allot of controls, and its a client/server program, uses tcpclient,tcpserver ! when the client connents i have no problem , when the client side program is closing , i close the tcpclient object, but it still stays open for a while ( when server is closed , clients closes exactly the same moment ) , how are these two still connected when i closed the connection?!

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Maybe you could try Kill function !! and btw , did you use Application.Exit to close your app or you just use End ?

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Sep 2003
    Posts
    227
    i dispose every object thats using computer resources , then just close , whats does application.exit do more ?

  6. #6
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    From MS Help File :

    Informs all message pumps that they must terminate, and then closes all application windows after the messages have been processed

    This method stops all running message loops on all threads and closes all windows of the application. This method does not force the application to exit. The Exit method is typically called from within a message loop, and forces Run to return. To exit a message loop for the current thread only, call ExitThread.

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Sep 2003
    Posts
    227
    sounds like its a solution, gotta try it, dont have vb arround now, thanks man, your allot of help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width