Closed Thread
Results 1 to 2 of 2

Thread: Client/Server Changing Password feature

  1. #1
    MrNobody is offline Newbie
    Join Date
    Oct 2006
    Posts
    23
    Rep Power
    20

    Client/Server Changing Password feature

    Hi..
    I want to add a change password feature to my client/server application using TCP.
    Normally, the change password feature has "Old Password", "New Password" and "Confirm Password" rite..?
    That means I need 3 text box and will be sending 3 different data at the same time..
    When sending only 1 data, for example, sending a data from client to server and put that data in a text box, that I know how to do.
    But when there are 3 different data sent at the same time from client to the server with 3 different text box to hold the data, how to make sure that the data go into the right text box in the server..?

    Below is the code that I have done.. It only send 1 data..
    The whole project is also attached below..
    Code:
    'Server
    Private Sub Form_Load()
    Form1.Visible = True
    Do
    If Winsock1.State <> sckConnected And Winsock1.State <> sckListening Then
    Winsock1.Close
    Winsock1.LocalPort = Text1.Text
    Winsock1.Listen
    End If
    DoEvents
    Loop
    End Sub
    
    Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
    Winsock1.Close
    Winsock1.Accept requestID
    Me.Caption = "Connection From: " & Winsock1.RemoteHostIP & " Accepted."
    End Sub
    
    Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
    Dim Data As String
    Winsock1.GetData Data
    Text2.Text = Data
    If Data = "END" Then End
    End Sub
    
    
    'Client
    Private Sub Command1_Click()
    On Error Resume Next
    Winsock1.Close
    Winsock1.RemoteHost = Text1.Text
    Winsock1.RemotePort = Text2.Text
    Winsock1.Connect
    End Sub
    
    Private Sub Command2_Click()
    Winsock1.Close
    Me.Caption = "Connection Closed."
    End Sub
    Private Sub Command3_Click()
    If Winsock1.State <> sckConnected Then Exit Sub
    Winsock1.SendData Text3.Text
    End Sub
    
    Private Sub Command4_Click()
    If Winsock1.State <> sckConnected Then Exit Sub
    Winsock1.SendData "END"
    End Sub
    Attached Files Attached Files

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Aug 2006
    Posts
    11,209
    Blog Entries
    6
    Rep Power
    101
    Perhaps you could add 3 winsock controls on server and client with different ports so the data is sent/recieved in diferent ports and therefore you will know that the port for example port 100000 is for the pass
    and port 100001 is another thing! and so on!

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Client Server
    By houlahan in forum Java Help
    Replies: 1
    Last Post: 02-02-2010, 09:18 AM
  2. Changing a cpanel email password with a simple script.
    By SeanStar in forum PHP Development
    Replies: 2
    Last Post: 12-09-2009, 08:54 AM
  3. Need help changing sounds in Betfair Poker client...
    By football in forum General Programming
    Replies: 7
    Last Post: 05-01-2009, 06:51 AM
  4. Client/Server
    By dani in forum C and C++
    Replies: 3
    Last Post: 11-11-2008, 07:43 AM
  5. Client / Server
    By eric in forum Marketing
    Replies: 0
    Last Post: 09-03-2007, 01:08 AM

Tags for this Thread

Bookmarks

Posting Permissions

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