Well almost everyone knows about the VB6 Version of IP Chat that i've been developing. Well for the past few weeks i've been working on a .NET version to help me hone my skills..
This version is far from complete and only has the user login and general chat modules done, And as per the VB6 App... this is a open source Progect that i'm opening up to all members to comment on..
Enjoy...
Gremmy...
--- EDIT ---
Newer file on later post (87 Downloads)..
Last edited by GremlinSA; June 25th, 2007 at 02:04 PM.
Well anyways, I've been busy working on this, and a update will be available soon, Currently writing the TCP Socket Class for file transfers.. Hope to complete it soon..
I just downloaded it. Haven't experimented much but saw the comment on the login about INI or registry.
I would say Registry. Probably 2 keys localmachine for subnet, ip,port and currentuser for username. You can start to add other to the user like color...
Anyway, here is a class to get you started.
And new code for your login page.
Code:
' Generealy the First MDI Child form that a user will see. Handles the initial
' Network and user setups..
'Also handles the visibility of the Login/Logout menu items on the Main form..
Public Class Login_page
Private Tmp_loop As Integer
Private Logged As Boolean
Private DefaultInfo As New clsUserInfo
Public Event Login_event(ByVal Login As Boolean)
Private Sub Login_page_Deactivate(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Deactivate
Main_F.LoginToolStripMenuItem.Enabled = Not Logged
Main_F.LogoutToolStripMenuItem.Enabled = Logged
ReDim User(0)
With User(0)
.Hidden = False
.Ignore = False
.IP = (Net.IPAddress.Parse(ComboBox1.Items(ComboBox1.SelectedIndex).ToString))
.Name = TextBox3.Text
End With
Subnet = Net.IPAddress.Parse(TextBox1.Text)
L_Port = CInt(TextBox2.Text)
' Must save to Reg or INI file too
RaiseEvent Login_event(Logged)
End Sub
Private Sub Login_page_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
End Sub
Private Sub Login_page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
DefaultInfo.Load()
Main_F.LoginToolStripMenuItem.Enabled = False
Main_F.LogoutToolStripMenuItem.Enabled = False
Dim Connections As ArrayList
Connections = GetLIPAdresses()
ComboBox1.Items.AddRange(Connections.ToArray)
If ComboBox1.Items.Count > 0 Then ComboBox1.SelectedIndex = 0
' Soon to be loaded and saved to Either reg or ini file (still deciding)
TextBox1.Text = DefaultInfo.SubNetMask
TextBox2.Text = DefaultInfo.DefaultPort
TextBox3.Text = DefaultInfo.UserName
Logged = False
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Hide()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
DefaultInfo.IPAddress = Me.ComboBox1.Text
DefaultInfo.SubNetMask = Me.TextBox1.Text
DefaultInfo.DefaultPort = Me.TextBox2.Text
DefaultInfo.UserName = Me.TextBox3.Text
DefaultInfo.Save()
Logged = True
Me.Hide()
End Sub
End Class
Bookmarks