Need Help Creating a Chat Bot in Visual Basic 2010 or Visual Web Developer Express

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
First - This is my first time creating a chat application. I have been researching for days and doing Trial and Error and I just need some professional Advice or Help
Here is my Code: I am using Visual Web Developer 2010
I am using a listbox to show messages and receive messages and a regular text box and a enter buttom

If TextBox.Text = ("Hi") Or TextBox.Text = ("Hello") Then<br/>
<br/>
chatbox.Items.Add("Hello My Friend.")<br/>
<br/>
End If<br/>
<br/>
If TextBox.Text = "Bye"
chatbox.Items.Add ("Have a great day.")<br/>
<br/>
End If<br/>
<br/>
<br/>
End Sub

This Code work for me but I need some help:
This is what I am needing help with
1)When I hit "enter" I would like the text that I entered into the text box to be imputed in the chatbox. The problem is I do not know the code for that.

2) I would like to be able to distinguish between the "user" and the automated reply from the bot. Again the problem is I do not know the code for this.


View the full article
 
Back
Top