Lost Password?


Go Back   CodeCall Programming Forum > Software Development > Visual Basic Programming

Visual Basic Programming Discussion forum for Visual Basic, an event driven programming language and associated development environment from Microsoft for its COM programming model.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-16-2006, 11:53 PM
MrNobody MrNobody is offline
Newbie
 
Join Date: Oct 2006
Posts: 23
Credits: 3
Rep Power: 8
MrNobody is on a distinguished road
Default 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
File Type: zip TCP Password.zip (3.6 KB, 13 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 11-19-2006, 05:10 AM
TcM's Avatar   
TcM TcM is offline
Code Warrior
 
Join Date: Aug 2006
Location: In a technologic world :p
Posts: 8,332
Credits: 0
Rep Power: 68
TcM is a glorious beacon of lightTcM is a glorious beacon of lightTcM is a glorious beacon of lightTcM is a glorious beacon of lightTcM is a glorious beacon of light
Default

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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Coding a change password form InternetGeek Visual Basic Programming 11 02-16-2008 02:53 PM
Forgot Your Password On XP? pranky Tutorials 12 04-26-2007 10:08 AM
Critical Firefox hole allows password theft Jordan Technology Ramble 31 01-22-2007 10:48 AM
Password Reset Disk PC101 Technology Ramble 0 09-12-2006 09:42 PM
ABAP: Changing Saint Database & Database Programming 2 08-08-2006 09:23 PM


All times are GMT -5. The time now is 07:56 AM.

Contest Stats

WingedPanther ........ 2656.49
Xav ........ 2576.41
Brandon W ........ 1698.26
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 959.05
dcs ........ 646.09
Steve.L ........ 475.59
orjan ........ 407.96
chili5 ........ 380.6

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 97%

Ads