windows chat application using microsoft visual C#

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ก.ย. 2024
  • For more information and more posts:
    www.tutsstore.com/

ความคิดเห็น • 285

  • @RollinShultz
    @RollinShultz 9 ปีที่แล้ว +11

    nice job, and I love it when someone can do a programming tutorial and I hear chickens clucking in the background.

  • @xterminatingangel2510
    @xterminatingangel2510 11 ปีที่แล้ว +1

    Nevermind. I figured out what was wrong. Thank you. Great video !!!

  • @nishanegi2525
    @nishanegi2525 5 ปีที่แล้ว +10

    I'm getting error when I click on connect button ...It shows 'an invalid argument was supplied' exception

    • @sidalibuilding37
      @sidalibuilding37 3 ปีที่แล้ว

      DIDU SOLVE IT ?

    • @nishanegi2525
      @nishanegi2525 3 ปีที่แล้ว

      @Boston Mendonca I tried that actually 2 years ago so don't even remember now

  • @vid8360
    @vid8360 3 ปีที่แล้ว +4

    When I try to connect to another PC it says that I have an error connecting to the socket and it doesn’t let me chat please help

    • @Tal__Shachar
      @Tal__Shachar 3 ปีที่แล้ว +1

      Is the other pc listening for connections?

  • @126644
    @126644 7 ปีที่แล้ว +1

    If you are using UDP to send and receive the data you would bind it but you wouldn't need to connect it to the server because UDP is a connectionless protocol if you are using TCP to transmit the data( which is what you should be using) you wouldn't need to bind your socket to part cause you should be issuing a TCPClient.connect from the client and have the server accept the incoming connect request with first having a TCPListener listening on the specified port, with TCPListener.Start and then using TCPClient = TCPListener.AcceptTCPClient to accept the incoming connection request then setting up a network stream so you can read and write data on the stream

  • @tekra8971
    @tekra8971 10 ปีที่แล้ว

    DISLIKERS, GET OFF TH-cam NNOOOOOWWW!!!!!! Good job, Ripon Datta.
    The worlds best programmer.

  • @deeliciousplum
    @deeliciousplum 10 ปีที่แล้ว

    Wonderful tutorial. Just came by to take a look at Visual C# and was so happy to discover that you were sharing of examples of code that I needed to explore. Thank you and wishing you a happy new year.

  • @logarathinam1782
    @logarathinam1782 6 ปีที่แล้ว

    Guys it's working perfectly when you give your port number in 4 digits like 8000 and 8001 ..Maybe a illegal solution but still it worked for me.

  • @ibo3460
    @ibo3460 4 ปีที่แล้ว

    Thank you Ripon for thorough explanation!

  • @yaguarete79
    @yaguarete79 11 ปีที่แล้ว +1

    Hey, this is great! I'm new at VB, also at programming, but found this tutorial very useful. I have some questions like: Shouldn't you also handle any exceptions like when you can't connect to your friend? or Wouldn't you also need a "Disconnect" button?

  • @gerardorosiles8918
    @gerardorosiles8918 9 ปีที่แล้ว +1

    Wow, I learned more in an hour than in years. Wow!

  • @SuperBulwy
    @SuperBulwy 11 ปีที่แล้ว

    Thanks for the tutorial :) I've done chat programmes before but only with TCP so it was great to see how to use it UDP :D

  • @jackieminton8514
    @jackieminton8514 6 ปีที่แล้ว +1

    i have 44 errors in the first 11 minutes and im following literally everything you are doing

    • @brennanbosco9477
      @brennanbosco9477 5 ปีที่แล้ว

      could you ever get it to work I have been trying to fix one error for over a week. can you summit the correct code?

  • @Niurtek
    @Niurtek 16 วันที่ผ่านมา

    Thank you. Its working for me.

  • @rjc131
    @rjc131 7 ปีที่แล้ว

    Worked well for me.... Now for a ,more advanced one. Thank you.

  • @GzFate
    @GzFate 10 ปีที่แล้ว +5

    Is this only for lan connection?
    Can I use this with a friend if he provides me the IP to connect him?

  • @lestanber
    @lestanber 8 ปีที่แล้ว +1

    Hello Mr Ripon good project but i have a question, does it work only on local network or can i use it to chat with my friend who lives in another country?

  • @notonbanglaobangali
    @notonbanglaobangali 11 ปีที่แล้ว

    Thanks Smith, you can use voice synthesizer.

  • @HandleDead
    @HandleDead 9 ปีที่แล้ว +6

    if I am from Ukraine and my friend from Germany, I could not contact him cheres this program ?? They only work program through the local ip

    • @DASSLER_channel
      @DASSLER_channel 4 ปีที่แล้ว

      Привет. Я тоже с Украины)) Такая же проблема))

    • @therandomsomeone.
      @therandomsomeone. 3 ปีที่แล้ว +1

      this program works only on your local network. this guy can't make a chat over the internet

  • @telopyd
    @telopyd 11 ปีที่แล้ว

    Thank you very much for this nice and helpful tutorial!

  • @suhanimendapara5141
    @suhanimendapara5141 7 ปีที่แล้ว +1

    this is for one common network .what to do if a network is no common?? Is there any link who shows a program for the different network?

  • @royd6310
    @royd6310 10 ปีที่แล้ว

    this is really awesome tutorials....thanks for this one... I just want to ask If I can input the IP manually to running windows form? example this program run in my comp and my friend run also this program in his/her computer in the same local area network. thanks in advance.. more power to you mate...

  • @chevylegit1286
    @chevylegit1286 11 ปีที่แล้ว

    i can't believe i sat here and watched the entire video while i don't know a thing about Programming#(THE power of Programming )

  • @bizzar31
    @bizzar31 11 ปีที่แล้ว

    wow I was looking for it , to get an over idea about that topic , I'm newbie in network programming :D , than you so much sir

  • @thelfino
    @thelfino 11 ปีที่แล้ว

    THANKS YOUR TUTORIAL WAS VERY WONDERFUL, THANKS A LOT!

  • @truekim1273
    @truekim1273 8 ปีที่แล้ว +1

    very very thaaaaaaaaaaaaaaaanks@!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :) love it !

  • @tigranvoskanyan1
    @tigranvoskanyan1 10 ปีที่แล้ว

    Thank you,it was very interesting lesson))

  • @MrValentine710
    @MrValentine710 6 ปีที่แล้ว +1

    How do you find out what port you or your friend is? Or all you need is their IP?

  • @meidheesh
    @meidheesh 11 ปีที่แล้ว

    useful for me...is any changes have to be done while we connecting two computers through the Lan cable?....pls reply ..thanking you

  • @mojizabbas6284
    @mojizabbas6284 8 ปีที่แล้ว +1

    hi sir..
    app is working same pc but how it work with 2 pc

  • @tekra8971
    @tekra8971 10 ปีที่แล้ว

    This really helped Ripon.

  • @info.web-marketadministrat9136
    @info.web-marketadministrat9136 4 ปีที่แล้ว

    Very good video

  • @Mharckee
    @Mharckee 10 ปีที่แล้ว

    Awesome tutorial!
    Can you make a tutorial with this,
    on how can I change font & color using fontdialog when I click the send.
    I can change the font & color in textMessage but when I hit the send button it turns back to normal.
    thanks in advance!

  • @nyadpics
    @nyadpics 8 ปีที่แล้ว +16

    Whats with those distant screams and moanings ?!?!?

    • @midobula4797
      @midobula4797 4 ปีที่แล้ว

      Rape

    • @gyrips4284
      @gyrips4284 4 ปีที่แล้ว +1

      @@midobula4797 shut up

    • @aiexzs
      @aiexzs 4 ปีที่แล้ว

      its a dog i think

    •  3 ปีที่แล้ว

      shh...

    • @gyrips4284
      @gyrips4284 3 ปีที่แล้ว

      @ your choice of music sucks ass

  • @pakito664
    @pakito664 5 ปีที่แล้ว

    excelente video amigo, explicado muy bien, paso a paso

  • @peter0197
    @peter0197 8 ปีที่แล้ว

    Hello, can I ask a question?
    I want to Connect to Arduino by Wi-Fi address.
    I write the Windows Form by C#, but I can't connect to the board.
    Can you teach me? I am a rookie in C#, Please.

  • @sonu531989
    @sonu531989 11 ปีที่แล้ว +2

    Hi Ripod, great tutorial man !!
    I have a query regarding using this code for web app.
    I have tried to use this code in web pages but getting error while sending msg at line
    socket.Send(sendingMessage);
    error msg is "A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied"
    can you please help me out on how can I implement this for web application.

    • @monilshah6138
      @monilshah6138 2 ปีที่แล้ว

      im facing the same problem did you get the solution?

  • @jayw6379
    @jayw6379 11 ปีที่แล้ว

    Thanks a lot for this great video! If i wanted the message to be read out loud when sent how would i do this?

  • @sivaranjani8348
    @sivaranjani8348 9 ปีที่แล้ว +2

    help!
    System.Net.Sockets.SocketException: A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied

    • @nayanrangel7962
      @nayanrangel7962 6 ปีที่แล้ว

      See in // binding Socket in epRemote, if you put sck.Bind (epRemote) or sck.Connect (epRemote), it may have put sck.Bind (epRemote) and it must be sck.Connect (epRemote).

    • @bachasjoshi
      @bachasjoshi 5 ปีที่แล้ว

      @@nayanrangel7962 I have written same code but it said "an attempt was made to access a socket in a way forbidden by its access permission.

  • @sarathgumma8836
    @sarathgumma8836 3 ปีที่แล้ว

    Good job,,but u have to reply the comments plsssssss,,,bcz there some people have some issues so clarify them

  • @ripondatta5830
    @ripondatta5830  11 ปีที่แล้ว +2

    yeah that's great enhancement.

  • @ngobakhanh8810
    @ngobakhanh8810 9 ปีที่แล้ว +1

    thank you so much !

  • @martinmica4260
    @martinmica4260 3 ปีที่แล้ว

    Awesome work!

  • @gas142
    @gas142 11 ปีที่แล้ว

    thank you very much !!
    this is a good one !!

  • @ripondatta5830
    @ripondatta5830  11 ปีที่แล้ว +1

    Thanks Fnoone, I will make this one.

  • @tudorrusu5469
    @tudorrusu5469 4 ปีที่แล้ว

    Respect in Indian Nation restored

  • @lazolabooi8212
    @lazolabooi8212 10 ปีที่แล้ว

    Ripon, I just subscribed, I would like to know the following. Is this specific to LAN networks, must it run over internet connection, and can it be done in a home/office setup?
    Once again, good work brother, explain to the par. Thank you again, I know what I'll be doing this evening.

    • @SamirRezai
      @SamirRezai 10 ปีที่แล้ว

      Sure. It can be run from your home or office setup.

  • @hammadiqbal171
    @hammadiqbal171 8 ปีที่แล้ว +1

    hi i have a problem after i have open exe file there is a error like that "input string was not in a correct format" after i continue this message i create chat with other part of chat app after that i recieve that message box "a request to send or recieve data was disallowed because the socket is not connected and (when sending the datagram socket using a sendtro call)no address was supplied" s plz help me in this?

    • @MoatazTammous
      @MoatazTammous 8 ปีที่แล้ว +1

      you may wrote txtLocalIp.Text instead of txtLocalPort.Text. Or the port text boxes are empty.
      epLocal = new IPEndPoint(IPAddress.Parse(textLocalIp.Text),Convert.ToInt32(textLocalPort.Text));

  • @sangvu6255
    @sangvu6255 7 ปีที่แล้ว

    I have a problem, i open 1 port at My Router, I sent to my friend IP Router and this Port.
    My friend can chat with me by using Socket Chat Application, I also chat with myselft by using this.
    But 1 program like as Skype or web as facebook not only don't need open a port, but also message is sent. I don't know how I do it?
    Hope you give me more inforamation usefully, thanks

  • @mk8530
    @mk8530 8 ปีที่แล้ว

    works on my machine, but cant get it to work with a co worker on the same network. Any Ideas? We configured everything correctly used his ip, and hit connect.. but no messages

  • @kelvinvanderheijden706
    @kelvinvanderheijden706 11 ปีที่แล้ว +2

    Hey, how do i connect to other pc's to chat with and not with myself. As exmaple i want to chat with someone else in other place of my country, how to do, or is this only for local chat?

    • @sanyaigroman
      @sanyaigroman 10 ปีที่แล้ว

      App in video will work, but only in the case when you and your friend have a static IP.

    • @charps
      @charps 6 ปีที่แล้ว

      what is a static ip?

  • @bhuwankandel8923
    @bhuwankandel8923 9 ปีที่แล้ว

    how to connect two difrnt mobil or computer at difrnt place without knowing each othrs port number but using same program as u instructed??????

  • @jessegerritsen9124
    @jessegerritsen9124 10 ปีที่แล้ว +2

    hii, it says that something wrong and it gives an error if i start the exe and it says that the error is in this part of the code:
    (sorry my english's bad im dutch 13)
    System.Net.Sockets.SocketException (0x80004005): Een aanvraag om gegevens te verzenden of te ontvangen is niet toegestaan omdat de socket niet is verbonden en omdat (tijdens het verzenden op een datagramsocket via een sendto-aanroep) geen adres is opgegeven
    bij System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
    bij System.Net.Sockets.Socket.Send(Byte[] buffer)
    bij chat.Form1.buttonSend_Click(Object sender, EventArgs e) in c:\Users\Gebruiker\Desktop\keylogg\chat\chat\Form1.cs:regel 98
    bij System.Windows.Forms.Control.OnClick(EventArgs e)
    bij System.Windows.Forms.Button.OnClick(EventArgs e)
    bij System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
    bij System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    bij System.Windows.Forms.Control.WndProc(Message& m)
    bij System.Windows.Forms.ButtonBase.WndProc(Message& m)
    bij System.Windows.Forms.Button.WndProc(Message& m)
    bij System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    bij System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    bij System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    this is the original code that i've write:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using System.Net;
    using System.Net.Sockets;
    namespace chat
    {
    public partial class Form1 : Form
    {
    Socket sck;
    EndPoint epLocal, epRemote;
    byte[] buffer;
    public Form1()
    {
    InitializeComponent();
    }
    private void Form1_Load(object sender, EventArgs e)
    {
    //set up socket
    sck = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
    sck.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);
    //get user ip
    textLocalIP.Text = "192.168.2.10";
    textRemoteIP.Text = "192.168.2.10";
    }
    private string GetLocalIP()
    {
    IPHostEntry host;
    host = Dns.GetHostEntry(Dns.GetHostName());
    foreach (IPAddress ip in host.AddressList)
    {
    if (ip.AddressFamily == AddressFamily.InterNetwork)
    return ip.ToString();
    }
    return "127.0.0.1";
    }
    private void buttonConnect_Click(object sender, EventArgs e)
    {
    //binding socket idk wat socket is
    epLocal = new IPEndPoint(IPAddress.Parse(textLocalIP.Text), Convert.ToInt32(textLocalPort.Text));
    sck.Bind(epLocal);
    //connecting to remote IP
    epRemote = new IPEndPoint(IPAddress.Parse(textRemoteIP.Text), Convert.ToInt32(textRemoteIP.Text));
    sck.Connect(epRemote);
    //listening the specific port
    buffer = new byte[1500];
    sck.BeginReceiveFrom(buffer, 0, buffer.Length, SocketFlags.None, ref epRemote, new AsyncCallback(MessageCallBack), buffer);
    }
    private void MessageCallBack(IAsyncResult aResult)
    {
    try
    {
    byte[] receivedData = new byte[1500];
    receivedData = (byte[])aResult.AsyncState;
    //converting byte[] to string
    ASCIIEncoding aEncoding = new ASCIIEncoding();
    string receivedMessage = aEncoding.GetString(receivedData);
    //adding this message into listbox
    listMessage.Items.Add("Friend: " + receivedMessage);
    buffer = new byte[1500];
    sck.BeginReceiveFrom(buffer, 0, buffer.Length, SocketFlags.None, ref epRemote, new AsyncCallback(MessageCallBack), buffer);
    }
    catch (Exception ex)
    {
    MessageBox.Show(ex.ToString());
    }
    }
    private void buttonSend_Click(object sender, EventArgs e)
    {
    //convent string message to byte[]
    ASCIIEncoding aEncoding = new ASCIIEncoding();
    byte[] sendingMessage = new byte[1500];
    sendingMessage = aEncoding.GetBytes(textMessage.Text);
    //sending the encoded message
    sck.Send(sendingMessage);
    //adding to listbox
    listMessage.Items.Add("Me: " + textMessage.Text);
    textMessage.Text = "";
    }
    }
    }
    i've also the program virtual box and the program is grab the ip of that program so i write in the textboxes my true ip
    greets jesse

    • @ripondatta5830
      @ripondatta5830  10 ปีที่แล้ว

      Jesse Gerritsen Sorry I can't read your language of error message. If you could write it in English version, I would be able to figure out your error. Thank you. Keep in touch.

    • @nayanrangel7962
      @nayanrangel7962 6 ปีที่แล้ว

      See in // binding Socket in epRemote, if you put sck.Bind (epRemote) or sck.Connect (epRemote), it may have put sck.Bind (epRemote) and it must be sck.Connect (epRemote).

  • @FnooneXnoname
    @FnooneXnoname 11 ปีที่แล้ว

    make one more this add feature like transfer files... thanks man really cool video.....

  • @microsecure2612
    @microsecure2612 5 ปีที่แล้ว

    i am very interested in this application:
    1- any possibility to add attachment button ?
    2- any possibility to have the code for this application ?
    Many thanks

  • @minhthanhle7474
    @minhthanhle7474 9 ปีที่แล้ว

    Hello Mr, Can you help me !
    After Rebuild Solution, i run the program, has an error occurred : "Input string was not in a correct format ".

  • @notonbanglaobangali
    @notonbanglaobangali 11 ปีที่แล้ว

    Meidheesh, you don't need to change anything in the code, you just put your IPs.

  • @piyushjadavk
    @piyushjadavk 3 ปีที่แล้ว

    is this app work with two different network? like my office have different network and my home have different network,

  • @fazarahmanfaza3579
    @fazarahmanfaza3579 8 ปีที่แล้ว

    pls upload any sharing site....good work

  • @animated.stories.reddit
    @animated.stories.reddit 3 ปีที่แล้ว +1

    hi probably noone will respond but my messages dont appear in chat

  • @nerdsbestadvice
    @nerdsbestadvice 11 ปีที่แล้ว

    Good video! You speak very good English!

  • @esrakarabiber368
    @esrakarabiber368 8 ปีที่แล้ว

    hello Mr, I watched your tutorial and applied the same process but I want to add Memory Mapped File to the code. I couldnt do this. Can you help me to solve the problem?

  • @IronNets
    @IronNets 11 ปีที่แล้ว

    If I tell you, I can't make the 'socket' function work in Visual Studio 12... any advice or corrections I may have to do?

  • @onkelhoy1
    @onkelhoy1 9 ปีที่แล้ว

    Fantastic! thanks!!

  • @dileep_kumar007
    @dileep_kumar007 8 ปีที่แล้ว

    I want to send files like audio,videos,image etc. may i get solution for this to implement this features in my chat application to send files.

  • @charmeegadoya2605
    @charmeegadoya2605 11 ปีที่แล้ว

    i hve a doubt ........is that.. why u hve taken port no 80 or 81?......n if i wnt to use another port for communication to remote pc ....so i hve to check in command prompt that which port is valid or for communication or there is specific port like that u hve used?n i hve to enter remote pc's ip address & port no also .......for this how can i check remote pc's port no...?

  • @niitpatole7744
    @niitpatole7744 10 ปีที่แล้ว

    hello sir....this application can use in two pc's using lan connection...??

  • @notonbanglaobangali
    @notonbanglaobangali 11 ปีที่แล้ว

    Thanks ibell for your interest, if you use IP address like the given example then you will able to chat with your friends.

  • @JoeSatellite
    @JoeSatellite 11 ปีที่แล้ว

    I have copied your code identically into a windows form using visual studio 2012 and I get an exception error on this line of code
    epLocal = new IPEndPoint(IPAddress.Parse(txtLocalIP.Text), Convert.ToInt32(txtLocalPort.Text));
    Input string not in the correct format. Any ideas

  • @muhammadsharjilbscsmspm
    @muhammadsharjilbscsmspm 6 ปีที่แล้ว

    Thanks Bro! if possible then also make a tutorial for Group Chat!

  • @kommolafe
    @kommolafe 11 ปีที่แล้ว

    This is nice! Thanks

  • @drinos123
    @drinos123 10 ปีที่แล้ว +1

    Hello Mr, one Question pls, why when i run the program cant gate my ip like your test ?

    • @ripondatta5830
      @ripondatta5830  10 ปีที่แล้ว

      Drino Duka follow the tutorial agian. Thank you so much. Write your voice or request in my site www.rdatta.com/You/YourVoice . Keep in touch with my site www.rdatta.com , www.f6build.com , www.di-ioc.com , www.codeffi.com and stay well.

  • @Ojje93
    @Ojje93 11 ปีที่แล้ว

    I really like your tutorial, do you know how to add ÅÄÖ characters to work in this chat?
    i know its something with the Ascii but I dont know how, thanks again!

  • @notonbanglaobangali
    @notonbanglaobangali 11 ปีที่แล้ว

    Did you add the following namespaces? if not add this
    using System.Net;
    using System.Net.Sockets;

  • @farukahmed258
    @farukahmed258 9 ปีที่แล้ว

    when i try to connect one error occured in my project FormatException was unhandled,
    input string is not in correct format in this line epLOcal= new IPEndPoint(IPAddress.Parse(textLocalIp.Text), Convert ToInt32(textLocalPort.Text)); i give prot number 80 and 81 plz help me

  • @mohamadrezamohamadi9915
    @mohamadrezamohamadi9915 3 ปีที่แล้ว

    Thank you

  • @shivangkhatri1412
    @shivangkhatri1412 5 ปีที่แล้ว

    very nice tutorial...

  • @trafalgarlaw3201
    @trafalgarlaw3201 10 ปีที่แล้ว +1

    Ripon Datta I NEED HELP!!!
    THE NAME "textMessage" does not exist in the current context.

    • @net777nu
      @net777nu 10 ปีที่แล้ว +1

      Check the name of your textBox for sending a message.

    • @octav7438
      @octav7438 5 ปีที่แล้ว

      damn, you people must not have known c#

  • @rakshasrivastava560
    @rakshasrivastava560 9 ปีที่แล้ว +1

    very nice tutorial (Y)

  • @ArbenBisha
    @ArbenBisha 10 ปีที่แล้ว

    Tried this on 2 remote computers but it didn't work.
    It works on my own computer like in your example though.

  • @nordxdelis2672
    @nordxdelis2672 9 ปีที่แล้ว

    thank you very much bro... ;)

  • @09072535
    @09072535 10 ปีที่แล้ว +2

    thanks :)

  • @EUgamingZone
    @EUgamingZone 9 ปีที่แล้ว +1

    Hello Ripon Datta, I have a project Internet Messenger Desktop Application , Please can u make a video from User registration to Chat between client to client over internet and send message from server to clients , Only connected clients get message from server. and Logged in clients chat to each other. I am really very thankful to you.

  • @blackberrysa5403
    @blackberrysa5403 4 ปีที่แล้ว

    Thank you very very very much

  • @youthclub1122
    @youthclub1122 7 ปีที่แล้ว

    while ruuning this application sometime its work fine but in WHEN i run 2 exe on same pc and send message from one application to other it shows cross thread operation operation not valid :control listbox_messge accessed from a thread otther than a thread it was created own

  • @greatwayabdu
    @greatwayabdu 2 ปีที่แล้ว

    Great tutorial man!
    But there was an error in this code
    string.receivedData = aEncoding.GetString(receivedData);
    first receivedData is an error
    what can i do?

  • @axelmouele5527
    @axelmouele5527 8 ปีที่แล้ว

    wonderful. but i've got a problem when i click "connect" its shows :impossible d'effectuer un cast d'un objet de type "System.Windows.Forms.TexBox"' en type "System.Iconvertible". Meanwhile i put the same values as you , for the ports. Can you help me please?

    • @abhijitjaiswal
      @abhijitjaiswal 8 ปีที่แล้ว

      +Axel MOUELE In buttonConnect_Click, you have missed to Convert.ToInt32(textRemotePort.Text)) or Convert.ToInt32(textLocalPort.Text)).The ".Text" part specially, I did the same thing and got the same error. Try it out.

  • @kadinsaleem2175
    @kadinsaleem2175 6 ปีที่แล้ว

    for me all the messages are blank it says friend: and nothing else
    im using vb 2010 ultimate

  • @kanikalungani
    @kanikalungani 11 ปีที่แล้ว

    Did you declare buffer as byte []buffer.
    If not then only then you get such an error

  • @safiyosiman6098
    @safiyosiman6098 3 ปีที่แล้ว

    Thank you so much

  • @cros108
    @cros108 9 ปีที่แล้ว

    i get an error saying "the name MessageCallBack does not exist in the current context". is it to do with the fact that i'm using vs 2013?

    • @cros108
      @cros108 9 ปีที่แล้ว

      Christos Karamanos Never mind i just spelled it wrong

    • @davidwilliams-cm1gd
      @davidwilliams-cm1gd 5 ปีที่แล้ว

      Mines almost work this way but would I use the same code for getlocalip for getremoteid

  • @olanschuh4405
    @olanschuh4405 9 ปีที่แล้ว +1

    OMG NVM IT WOKR TANK HEW THANSK WOWOWWOOW SUBBED

  • @cyd0c505
    @cyd0c505 7 ปีที่แล้ว +1

    Can I connect it withe my friend's ip?

  • @bupathisangeeth2249
    @bupathisangeeth2249 9 ปีที่แล้ว

    Can i use this same code if i lan two computers up ?

  • @vinhhoang8915
    @vinhhoang8915 5 ปีที่แล้ว

    How can we connect it using a LAN cable between two laptops
    please describe it briefly
    thank you

    • @amused4812
      @amused4812 5 ปีที่แล้ว

      Still the Same, if both of ur Laptops are connected to the Internet via LAN. Just use the IP Address of the Laptops

  • @tusharshinde777
    @tusharshinde777 11 ปีที่แล้ว

    why did you callback'ed again at 19:00.. is it for recursively receiving the message from remote user as u have again passed the argument as MessageCallBack in AsynchCallBack().. doesn't it mean to be the recursive function?? :o Help..

  • @itsyoboydiarrhea5479
    @itsyoboydiarrhea5479 6 ปีที่แล้ว

    Error CS0103 The name 'MessageCallBack' does not exist in the current context
    help

  • @jarede1001
    @jarede1001 10 ปีที่แล้ว +1

    Obrigado cara!!!

    • @ripondatta5830
      @ripondatta5830  10 ปีที่แล้ว

      Jarede Santos Thank you. Keep in touch.

    • @jarede1001
      @jarede1001 10 ปีที่แล้ว

      Ripon Datta Hello , you have a video chat on windows application using WCF technology? Thank you .

  • @ricardo130695
    @ricardo130695 6 ปีที่แล้ว

    Thank you :D

  • @karynelxq2463
    @karynelxq2463 7 ปีที่แล้ว

    Greetings;
    I'm getting the following Error: "An Invalid Argument Was Supplied"
    I've watched the entire Tutorial several times and Double Checked Everything.
    Everything seems correct and i can't figure the problem.
    According to the kind of Error Message the Problem lies under the "Connect Button" Coding.
    protected void Button1_Click(object sender, EventArgs e)
    {
    //binding socket
    epLocal = new IPEndPoint(IPAddress.Parse(textLocalIP.Text), Convert.ToInt32(TextBox2.Text));
    sck.Bind(epLocal);
    //connecting to friend IP
    epRemote = new IPEndPoint(IPAddress.Parse(textFriendIP.Text), Convert.ToInt32(TextBox4.Text));
    sck.Bind(epRemote);
    //listening to specific port
    buffer = new byte[1500];
    sck.BeginReceiveFrom(buffer, 0, buffer.Length, SocketFlags.None, ref epRemote, new AsyncCallback(MessageCallBack), buffer);
    }
    Can Anyone Help me out in figuring this out?
    Thanks in advance.