Sign in to follow this  

[VB.NET] In class we made a simple tictactoe program but how do you use tcp

Recommended Posts

+Andre S.    1,892

I dont get any of the codes they all use me.whatever and that always causes an error

"Me" is a reference to the current object, for instance if your code is inside your main Form class (like most tutorials assume), then "Me" is a reference to the Form object, which has an Invoke and a BeginInvoke method. Since I suppose you segregated your background thread code to another class, you'll have to pass it a reference to the Form object in order to invoke any methods of the Form from it. Alternatively, you could simply bring that code back to the main Form class and you'd be able to use "Me" to reference to Form then.

Share this post


Link to post
Share on other sites
togermano    50

I did I tried form1 and it didnt work even with the illegals off

Share this post


Link to post
Share on other sites
togermano    50

I got it working I had to change Public Shared Sub ticserver() too Public Function ticserver()

Share this post


Link to post
Share on other sites
togermano    50

I got the basis of it working..... Just gotta work on disabling the buttons until the next persons turn then reverse that for the other player :)

and somehow pick a random player to go first then alert both server and client of choice

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.