|
-
Sep 20th, 2022, 10:07 AM
#2
Re: X close button not closing the Form (hangs)
Firstly, why are you calling Application.Exit and then using End? Never use End at all but, if you were going to, calling Application.Exit first would be pointless. The point of Application.Exit is to exit the application cleanly while the point of End is to dump it out of memory unceremoniously there and then. Get rid of the End statement and never use it again.
As for the issue, debug your code. A hang is either an infinite loop or a method that doesn't return. The debugger will tell you which and where it is. I would guess that it's in serDisconnect somewhere but you don't have to guess, so neither should we.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|