Deleted

I thought that doing CancelAsync would stop the BW, but it doesn't... I need help!
You need help, there's a Help menu in your IDE and yet you haven't bothered to use it. If you try to use a type or member and it doesn't work the way you expect then the obvious first step should be to read the documentation for that type or member. If you had done that for the CancelAsync method then you would know what you're doing wrong and what you need to do to fix it.
 
That said, once you know how cancelling a BackgroundWorker is done you will see that there's actually no way you can do so in your code. Given that the TcpClient provides two different ways to connect asynchronously though, you don;t need to use a BackgroundWorker at all. Use the asynchronous functionality built into the TcpClient and then there's no issue with a BackgroundWorker being busy.
 
Is this the solution to my problem? Could you please provide an example?
What did you not understand about the information that you found when you made some sort of effort on your own behalf? I'm happy to help but help implies an addition to your own effort, not a replacement. Have you, for instance, read the documentation for the TcpClient class?
 
link to this documentation
You can use the Help menu in Visual Studio and context help using F1. Online the documentation is at MSDN, it is not uncommon it is the first match in search engines when you try to search for some class or member. Here is the online documentation for TcpClient class: TcpClient Class (System.Net.Sockets)
forward this question to another moderator to help me with
That is not what moderators in a forum do: Internet forum moderators - Wikipedia, the free encyclopedia
 
I would like to ask for you to at least provide a link to this documentation you seem to know about that I don't.
Um, it's the Help menu in VS. You can even click the TcpClient class in code and press F1 to go straight to the topic for that class. This is standard Windows behaviour. Anyone who has used Windows for a reasonable amount of time should know how to use the Help menu.
 
I expected help from you guys not lectures on use of help menus.
I will have to get professional advice elsewhere.

Dear Me, not again.

Isaac,

I have not been on this Forum too long myself but in the time that I have been on the Forum I have seen a few posts like this where a young programmer alienates themselves from professional developers since they expect those professionals to do everything for them.

So, here are a few pointers for you, since it makes me cringe to think that, at 16, you have just lost the support of the TWO MOST PROFESSIONAL and EXPERIENCED programmers on this Forum!

If, after posting, someone, or in this case, two professionals, direct you to read some documentation then there's probably a good reason to do so, don't you think? To then basically throw that back in the faces of the people who have suggested this is not only rude, but disrespectful.

As you grow older, you will find that life is all about helping yourself and not just expecting others to do everything for you. That person is called your Mother. The fact that there are professionals on this Forum that take their own valuable time to give you some advice and support should be treated with respect and acted upon accordingly.

If you then find that the information provided does not help, then you should describe what you have done, what you have tried, including code examples where appropriate and what is still not working for you. That way, you will find that professionals will respond in the same manner with there own expertise to guide you further.

To finish then, there are two things you can do here:-

1) Write me off as a "babbling old fool" and ignore everything I have said. If so, then good luck in getting anywhere in life which will be a struggle.

2) Grow up, and take on board the fact that you need to do your own studying in life so that at some point you can become a professional yourself in your chosen career.

Your choice.

Cheers,

Ian
 
Hi,

Good for you in NOT shying away and actually coming back to "face life head on" so to speak. I am proud of you.

I am NOT going to jump in here and start helping you when you already have two professional programmers providing their expertise. Based on your comments, I would suggest you respond to those professionals (NOT ME) by providing detailed information on what you do not understand. i.e:-

I would have to say though, that the two professionals pointed me to something that I already was staring at.

If that was the case then what's the issue that you have? What do you not understand with the documentation? Be detailed and specific.

I have shown where the problem is in the code with comments.

All you have said in your comments is "this is where the problem is". What does that mean? What error are you getting and what are you expecting? Again, be detailed and specific.

Yes, I know that in my future life I will have to do things on my own, but a forum like this one that claims to be a community makes me understand that teamwork and helping others is involved.

That is very true but what does the word Teamwork mean? Teamwork means to help EACH OTHER solve problems based on knowledge gained. i.e GIVE AND TAKE accumulated experiences.

All that said, I would now suggest that you go back to Post No.5 and Post No.7 and answer them in detail, describing specifically what you have read, what you do not understand and where you are still struggling.

If you do this correctly then I would bet that the professionals that have responded to you so far will come back to the table to help you ultimately solve the issue you are having but this is going to be down to you to respectfully say the right things.

If you are successful, then you will not only get the answers to your problems but you will have learned a valuable lesson in Life about how things work in the world.

Good Luck and I will be keeping an eye on your progress.

Kind regards,

Ian
 
Back
Top