diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..2821de5 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,86 @@ +# VB6 source files (show diff + keep CRLF in zip download) + +*.bas working-tree-encoding=CP1252 text eol=crlf linguist-language=vb6 +*.cls working-tree-encoding=CP1252 text eol=crlf linguist-language=vb6 +*.ctl working-tree-encoding=CP1252 text eol=crlf linguist-language=vb6 +*.dob working-tree-encoding=CP1252 text eol=crlf linguist-language=vb6 +*.dsr working-tree-encoding=CP1252 text eol=crlf linguist-language=vb6 +*.frm working-tree-encoding=CP1252 text eol=crlf linguist-language=vb6 +*.pag working-tree-encoding=CP1252 text eol=crlf linguist-language=vb6 +*.vbg working-tree-encoding=CP1252 text eol=crlf +*.vbl working-tree-encoding=CP1252 text eol=crlf +*.vbp working-tree-encoding=CP1252 text eol=crlf +*.vbr working-tree-encoding=CP1252 text eol=crlf +*.vbw working-tree-encoding=CP1252 text eol=crlf + +# Other source files (show diff + LF only in zip download) + +*.asm text +*.asp text +*.bat text +*.c text +*.cpp text +*.dsp text +*.dsw text +*.h text +*.idl text +*.java text +*.js text +*.manifest text +*.odl text +*.php text +*.php3 text +*.rc text +*.sln text +*.sql text +*.vb text +*.vbs text + +# Binary + +*.res binary +*.frx binary +*.ctx binary +*.dsx binary +*.exe binary +*.dll binary +*.ocx binary +*.cmp binary +*.pdb binary +*.tlb binary +*.xls binary +*.doc binary +*.ppt binary +*.xlsx binary +*.docx binary +*.pptx binary +*.chm binary +*.hlp binary +*.jpg binary +*.png binary +*.bmp binary +*.gif binary +*.ico binary +*.zip binary +*.cab binary +*.7z binary +*.gz binary + +# Text files but keep as binary (no diff) + +# *.cfg text +# *.conf text +# *.csi text +# *.css text +# *.csv text +# *.def text +# *.htm text +# *.html text +# *.inf text +# *.ini text +# *.log text +# *.reg text +# *.rtf text +# *.txt text +# *.url text +# *.xml text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8ad71de --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +*.scc +*.dca +*.oca +*.obj +vb*.tmp +@PSC* diff --git a/Form1.frm b/Form1.frm new file mode 100644 index 0000000..8e7078c --- /dev/null +++ b/Form1.frm @@ -0,0 +1,647 @@ +VERSION 5.00 +Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX" +Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX" +Object = "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0"; "SHDOCVW.DLL" +Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX" +Begin VB.Form Form1 + BorderStyle = 1 'Fixed Single + Caption = "InterChat" + ClientHeight = 2280 + ClientLeft = 45 + ClientTop = 330 + ClientWidth = 4515 + Icon = "Form1.frx":0000 + LinkTopic = "Form1" + MaxButton = 0 'False + MinButton = 0 'False + ScaleHeight = 2280 + ScaleWidth = 4515 + StartUpPosition = 2 'CenterScreen + Begin VB.PictureBox Picture1 + Height = 2775 + Left = 0 + ScaleHeight = 2715 + ScaleWidth = 4455 + TabIndex = 1 + Top = 2400 + Width = 4515 + Begin SHDocVwCtl.WebBrowser web + Height = 2695 + Left = 0 + TabIndex = 2 + Top = 0 + Width = 4440 + ExtentX = 7832 + ExtentY = 4754 + ViewMode = 0 + Offline = 0 + Silent = 0 + RegisterAsBrowser= 0 + RegisterAsDropTarget= 1 + AutoArrange = 0 'False + NoClientEdge = 0 'False + AlignLeft = 0 'False + ViewID = "{0057D0E0-3573-11CF-AE69-08002B2E1262}" + Location = "" + End + End + Begin TabDlg.SSTab SSTab1 + Height = 2295 + Left = 0 + TabIndex = 0 + Top = 0 + Width = 4515 + _ExtentX = 7964 + _ExtentY = 4048 + _Version = 393216 + Tab = 2 + TabHeight = 520 + TabCaption(0) = "Connection" + TabPicture(0) = "Form1.frx":0CCA + Tab(0).ControlEnabled= 0 'False + Tab(0).Control(0)= "Frame2" + Tab(0).Control(0).Enabled= 0 'False + Tab(0).Control(1)= "Frame1" + Tab(0).Control(1).Enabled= 0 'False + Tab(0).Control(2)= "Option1" + Tab(0).Control(2).Enabled= 0 'False + Tab(0).Control(3)= "Option2" + Tab(0).Control(3).Enabled= 0 'False + Tab(0).ControlCount= 4 + TabCaption(1) = "Chat" + TabPicture(1) = "Form1.frx":0CE6 + Tab(1).ControlEnabled= 0 'False + Tab(1).Control(0)= "Console" + Tab(1).Control(0).Enabled= 0 'False + Tab(1).Control(1)= "Sender" + Tab(1).Control(1).Enabled= 0 'False + Tab(1).Control(2)= "SendButton" + Tab(1).Control(2).Enabled= 0 'False + Tab(1).ControlCount= 3 + TabCaption(2) = "Transfer" + TabPicture(2) = "Form1.frx":0D02 + Tab(2).ControlEnabled= -1 'True + Tab(2).Control(0)= "Image1" + Tab(2).Control(0).Enabled= 0 'False + Tab(2).Control(1)= "Frame3" + Tab(2).Control(1).Enabled= 0 'False + Tab(2).Control(2)= "Frame4" + Tab(2).Control(2).Enabled= 0 'False + Tab(2).Control(3)= "Frame5" + Tab(2).Control(3).Enabled= 0 'False + Tab(2).ControlCount= 4 + Begin VB.Frame Frame5 + Appearance = 0 'Flat + BorderStyle = 0 'None + Enabled = 0 'False + ForeColor = &H80000008& + Height = 735 + Left = 120 + TabIndex = 23 + Top = 360 + Width = 2895 + Begin VB.OptionButton Option3 + Caption = "I Would Like To Send A File" + Height = 255 + Left = 120 + TabIndex = 25 + Top = 120 + Value = -1 'True + Width = 2295 + End + Begin VB.OptionButton Option4 + Caption = "I Would Like To Send A Picture" + Height = 255 + Left = 120 + TabIndex = 24 + Top = 360 + Width = 2655 + End + End + Begin VB.CommandButton SendButton + Caption = "Send" + Enabled = 0 'False + BeginProperty Font + Name = "MS Serif" + Size = 8.25 + Charset = 0 + Weight = 700 + Underline = 0 'False + Italic = 0 'False + Strikethrough = 0 'False + EndProperty + Height = 285 + Left = -71400 + TabIndex = 12 + Top = 1860 + Width = 735 + End + Begin VB.TextBox Sender + Enabled = 0 'False + Height = 285 + Left = -74880 + TabIndex = 11 + Top = 1860 + Width = 3375 + End + Begin VB.TextBox Console + Enabled = 0 'False + Height = 1335 + Left = -74880 + MultiLine = -1 'True + ScrollBars = 2 'Vertical + TabIndex = 10 + Top = 400 + Width = 4215 + End + Begin VB.OptionButton Option2 + Caption = "I Will Act As The Guest For This Connection Session" + Height = 255 + Left = -74760 + TabIndex = 4 + ToolTipText = " You Will Connect To The Host Of This Session " + Top = 900 + Width = 4095 + End + Begin VB.OptionButton Option1 + Caption = "I Will Act As The Host For This Connection Session" + Height = 255 + Left = -74760 + TabIndex = 3 + ToolTipText = " You Will Host This Session. The Guest Will Connect To You " + Top = 540 + Value = -1 'True + Width = 3975 + End + Begin VB.Frame Frame1 + Caption = "Host" + Height = 735 + Left = -74760 + TabIndex = 5 + Top = 1260 + Width = 4095 + Begin VB.CommandButton Command1 + Caption = "Await Connection From Guest" + Height = 255 + Left = 240 + TabIndex = 6 + ToolTipText = " Await Connection From The Guest " + Top = 300 + Width = 3615 + End + End + Begin VB.Frame Frame4 + Caption = "Send File" + Enabled = 0 'False + Height = 975 + Left = 180 + TabIndex = 18 + Top = 1080 + Width = 4095 + Begin VB.TextBox Text3 + Enabled = 0 'False + Height = 285 + Left = 120 + TabIndex = 21 + Top = 600 + Width = 2535 + End + Begin VB.CommandButton Command6 + Caption = "Browse" + BeginProperty Font + Name = "MS Serif" + Size = 8.25 + Charset = 0 + Weight = 700 + Underline = 0 'False + Italic = 0 'False + Strikethrough = 0 'False + EndProperty + Height = 285 + Left = 2760 + TabIndex = 20 + Top = 240 + Width = 1215 + End + Begin VB.CommandButton Command5 + Caption = "Send" + BeginProperty Font + Name = "MS Serif" + Size = 8.25 + Charset = 0 + Weight = 700 + Underline = 0 'False + Italic = 0 'False + Strikethrough = 0 'False + EndProperty + Height = 285 + Left = 2760 + TabIndex = 19 + Top = 600 + Width = 1215 + End + Begin MSComDlg.CommonDialog CommonDialog1 + Left = 2040 + Top = 240 + _ExtentX = 847 + _ExtentY = 847 + _Version = 393216 + End + Begin VB.Label Label2 + Caption = "File Location && Name" + Height = 195 + Left = 120 + TabIndex = 22 + Top = 300 + Width = 1755 + End + End + Begin VB.Frame Frame3 + Caption = "Send Picture" + Enabled = 0 'False + Height = 975 + Left = 180 + TabIndex = 13 + Top = 1080 + Width = 4095 + Begin MSComDlg.CommonDialog cmd + Left = 2040 + Top = 240 + _ExtentX = 847 + _ExtentY = 847 + _Version = 393216 + End + Begin VB.CommandButton Command4 + Caption = "Send" + BeginProperty Font + Name = "MS Serif" + Size = 8.25 + Charset = 0 + Weight = 700 + Underline = 0 'False + Italic = 0 'False + Strikethrough = 0 'False + EndProperty + Height = 285 + Left = 2760 + TabIndex = 17 + Top = 600 + Width = 1215 + End + Begin VB.CommandButton Command3 + Caption = "Browse" + BeginProperty Font + Name = "MS Serif" + Size = 8.25 + Charset = 0 + Weight = 700 + Underline = 0 'False + Italic = 0 'False + Strikethrough = 0 'False + EndProperty + Height = 285 + Left = 2760 + TabIndex = 16 + Top = 240 + Width = 1215 + End + Begin VB.TextBox Text2 + Enabled = 0 'False + Height = 285 + Left = 120 + TabIndex = 15 + Top = 600 + Width = 2535 + End + Begin VB.Label Label1 + Caption = "Picture Location && Name" + Height = 195 + Left = 120 + TabIndex = 14 + Top = 300 + Width = 1755 + End + End + Begin VB.Frame Frame2 + Caption = "Guest" + Height = 735 + Left = -74760 + TabIndex = 7 + Top = 1260 + Visible = 0 'False + Width = 4095 + Begin VB.TextBox Text1 + Alignment = 2 'Center + Height = 285 + Left = 120 + TabIndex = 9 + Text = "000.000.000.000" + ToolTipText = " The Internet Protocol (IP) Number Of The Host To Connect To " + Top = 280 + Width = 1575 + End + Begin VB.CommandButton Command2 + Caption = "Connect To Host" + Height = 255 + Left = 2040 + TabIndex = 8 + ToolTipText = " Click Here To Connect To The Host " + Top = 300 + Width = 1815 + End + End + Begin VB.Image Image1 + Appearance = 0 'Flat + BorderStyle = 1 'Fixed Single + Height = 615 + Left = 3120 + Stretch = -1 'True + Top = 420 + Visible = 0 'False + Width = 1145 + End + End + Begin MSWinsockLib.Winsock Chat + Left = 480 + Top = 0 + _ExtentX = 741 + _ExtentY = 741 + _Version = 393216 + End + Begin MSWinsockLib.Winsock Transfer + Left = 0 + Top = 0 + _ExtentX = 741 + _ExtentY = 741 + _Version = 393216 + End +End +Attribute VB_Name = "Form1" +Attribute VB_GlobalNameSpace = False +Attribute VB_Creatable = False +Attribute VB_PredeclaredId = True +Attribute VB_Exposed = False + +Private Sub Chat_Close() +Console.Enabled = False +Sender.Enabled = False +SendButton.Enabled = False +Frame5.Enabled = False +Frame4.Enabled = False +Frame3.Enabled = False +End Sub + +Private Sub Chat_Connect() +web.Navigate "http://" & Chat.RemoteHostIP +SSTab1.Tab = 1 +Frame5.Enabled = True +Frame4.Enabled = True +Frame3.Enabled = True +Console.Enabled = True +Sender.Enabled = True +SendButton.Enabled = True +Sender.SetFocus +End Sub + +Private Sub Chat_ConnectionRequest(ByVal requestID As Long) +Chat.Close +Chat.Accept requestID +web.Navigate "http://" & Chat.RemoteHostIP +SSTab1.Tab = 1 +Frame5.Enabled = True +Frame4.Enabled = True +Frame3.Enabled = True +Console.Enabled = True +Sender.Enabled = True +SendButton.Enabled = True +Sender.SetFocus +End Sub + + +Private Sub Chat_DataArrival(ByVal bytesTotal As Long) +Dim strData As String +Chat.GetData strData +If strData = "*PICREQUEST*" Then +web.Refresh +Form1.Height = 5565 +Exit Sub +End If +Console.Text = Console.Text & vbCrLf & strData +Console.SetFocus +Console.SelStart = Len(Console.Text) +Sender.SetFocus +End Sub + +Private Sub Command1_Click() +Chat.Close +Chat.LocalPort = CLng(187) +Chat.Listen +End Sub + +Private Sub Command2_Click() +On Error GoTo erh +Chat.Close +Chat.Connect Text1.Text, 187 +Exit Sub +erh: +MsgBox "The server is not accepting connection requests at this time." +Chat.Close +Exit Sub +End Sub + + +Private Sub Command3_Click() +On Error GoTo erh +cmd.DialogTitle = "Picture To Send..." +cmd.Filename = "*.jpg;*.gif" +cmd.InitDir = CurDir +cmd.Filter = "JPG & GIF Files (*.jpg;*.gif)" +cmd.ShowOpen +Dim sFile As String, sShortFile As String * 67 +Dim lRet As Long +sFile = cmd.Filename +lRet = GetShortPathName(sFile, sShortFile, Len(sShortFile)) +sFile = Left(sShortFile, lRet) +Text2.Text = sFile +Image1.Picture = LoadPicture(Text2.Text) +erh: +Exit Sub +End Sub + +Private Sub Command4_Click() +If Text2.Text = "" Then +MsgBox "Select A Picture To Send." +Command3_Click +Exit Sub +End If +Transfer.Close +Transfer.LocalPort = CLng(80) +Transfer.Listen +Chat.SendData "*PICREQUEST*" + +End Sub + + +Private Sub Command5_Click() +If Text3.Text = "" Then +MsgBox "Select A File To Send." +Command6_Click +Exit Sub +End If +Transfer.Close +Transfer.LocalPort = CLng(80) +Transfer.Listen +Chat.SendData "*PICREQUEST*" + +End Sub + +Private Sub Command6_Click() +'On Error GoTo erh +cmd.DialogTitle = "File To Send..." +cmd.Filename = "*.zip;*.rar" +cmd.InitDir = CurDir +cmd.Filter = "WinZIP & WinRAR Files (*.zip;*.rar)" +cmd.ShowOpen +Dim sFile As String, sShortFile As String * 67 +Dim lRet As Long +sFile = cmd.Filename +lRet = GetShortPathName(sFile, sShortFile, Len(sShortFile)) +sFile = Left(sShortFile, lRet) +Text3.Text = sFile +erh: +Exit Sub +End Sub + +Private Sub Form_Load() +Show +Form1.Caption = "InterChat - ( " & CurrentIP(True) & " )" +End Sub + +Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) +On Error Resume Next +Chat.Close +Transfer.Close +Unload Me +End +End Sub + + +Private Sub Form_Terminate() +On Error Resume Next +Chat.Close +Transfer.Close +Unload Me +End +End Sub + + +Private Sub Form_Unload(Cancel As Integer) +On Error Resume Next +Chat.Close +Transfer.Close +Unload Me +End +End Sub + + +Private Sub Option1_Click() +Frame1.Visible = True +Frame2.Visible = False +Command1.SetFocus +End Sub + + +Private Sub Option2_Click() +Frame2.Visible = True +Frame1.Visible = False +Text1.SetFocus +Text1.SelStart = 0 +Text1.SelLength = Len(Text1.Text) +End Sub + + +Private Sub Option3_Click() +Image1.Enabled = False +Frame3.Visible = False +Frame4.Visible = True +Command6_Click +End Sub + +Private Sub Option4_Click() +Frame3.Visible = True +Frame4.Visible = False +Image1.Picture = LoadPicture() +Image1.Visible = True +Command3_Click +End Sub + +Private Sub SendButton_Click() +Dim strData As String +strData = Chat.LocalHostName & ": " & Sender.Text +Chat.SendData strData +Console.Text = Console.Text & vbCrLf & strData +Console.SetFocus +Console.SelStart = Len(Console.Text) +Sender.Text = "" +Sender.SetFocus +End Sub + + +Private Sub Sender_KeyPress(KeyAscii As Integer) +If KeyAscii = 13 Then +SendButton_Click +KeyAscii = 0 +Exit Sub +End If +End Sub + + +Private Sub SSTab1_Click(PreviousTab As Integer) +On Error Resume Next +If SSTab1.Tab = 1 Then Sender.SetFocus +End Sub + +Private Sub Text1_KeyPress(KeyAscii As Integer) +If KeyAscii = 13 Then +Command2_Click +KeyAscii = 0 +Exit Sub +End If +End Sub + + +Private Sub Transfer_ConnectionRequest(ByVal requestID As Long) +Transfer.Close +Transfer.Accept requestID +End Sub + +Private Sub Transfer_DataArrival(ByVal bytesTotal As Long) +On Error Resume Next +If Option4.Value = True Then +f = FreeFile +temp = "" +Open Text2.Text For Binary As #f + temp = Input(FileLen(Text2.Text), #f) +Close #f +getimg = temp +Transfer.SendData getimg +End If +If Option3.Value = True Then +f = FreeFile +temp = "" +Open Text3.Text For Binary As #f + temp = Input(FileLen(Text3.Text), #f) +Close #f +getimg = temp +Transfer.SendData getimg +End If +End Sub + + +Private Sub Transfer_SendComplete() +Transfer.Close +SSTab1.Tab = 1 +Chat.SendData "***Transfer Complete" +End Sub + + diff --git a/Form1.frx b/Form1.frx new file mode 100644 index 0000000..d06cc27 Binary files /dev/null and b/Form1.frx differ diff --git a/MattsBAS.bas b/MattsBAS.bas new file mode 100644 index 0000000..2769d8b --- /dev/null +++ b/MattsBAS.bas @@ -0,0 +1,309 @@ +Attribute VB_Name = "MattsBAS" +Public a As Long +Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) _ + As Long +Public lShowCursor As Long +Public lRet As Long +Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) +Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long +Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long +Public Const SND_SYNC = &H0 +Public Const SND_ASYNC = &H1 +Public Const SND_NODEFAULT = &H2 +Public Const SND_MEMORY = &H4 +Public Const SND_ALIAS = &H10000 +Public Const SND_FILENAME = &H20000 +Public Const SND_RESOURCE = &H40004 +Public Const SND_ALIAS_ID = &H110000 +Public Const SND_ALIAS_START = 0 +Public Const SND_LOOP = &H8 +Public Const SND_NOSTOP = &H10 +Public Const SND_VALID = &H1F +Public Const SND_NOWAIT = &H2000 +Public Const SND_VALIDFLAGS = &H17201F + +Public Const SND_RESERVED = &HFF000000 +Public Const SND_TYPE_MASK = &H170007 + +Public RAN As Long + + +Sub CollideDetection(ObjectHitting As Object, ObjectBeingHit As Object) +a = a + 1 +If a = 36 Then a = 0 +If ObjectHitting.Left + ObjectHitting.Width > ObjectBeingHit(a).Left Then + If ObjectHitting.Left < ObjectBeingHit(a).Left + ObjectBeingHit(a).Width Then + If ObjectHitting.Top < ObjectBeingHit(a).Top + ObjectBeingHit(a).Height Then + If ObjectHitting.Top + ObjectHitting.Height > ObjectBeingHit(a).Top Then + MsgBox "DOOMED!" + End If + End If + End If + End If + +End Sub + + +Public Sub HideMouse() + Do + lShowCursor = lShowCursor - 1 + lRet = ShowCursor(False) + Loop Until lRet < 0 +End Sub + +Sub LoadTextToList(Filename As String, lst As ListBox) +Dim aLine As String +Open Filename For Input As 1 +Do Until EOF(1) + Line Input #1, aLine + If Trim$(aLine) <> "" Then lst.AddItem aLine +Loop +Close 1 +End Sub + + +Sub NotOnTop(the As Form) +SetWinOnTop = SetWindowPos(the.hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, Flags) +End Sub + + +Sub ParseList(StringToRemove As String, lst As ListBox) +Dim X As Integer +Dim Search, Where +lst.ListIndex = -1 +On Error GoTo erh +Do +Start: +lst.ListIndex = lst.ListIndex + 1 +Search = StringToRemove +Where = InStr(lst.Text, StringToRemove) +If Where Then GoTo Start +lst.RemoveItem lst.ListIndex +Loop Until lst.ListIndex = lst.ListCount - 1 +erh: +Exit Sub +End Sub + +Sub playwav(File) +SoundName$ = File +SoundFlags& = &H20000 Or &H1 +snd& = sndPlaySound(SoundName$, SoundFlags&) +End Sub +Sub AddToList(lst As ListBox, Str As String) +lst.AddItem Str +End Sub + + +Sub CenterForm(Frm As Form) +Frm.Top = Screen.Height / 2 - Frm.Height / 2 +Frm.Left = Screen.Width / 2 - Frm.Width / 2 +End Sub + + +Sub CMDShowOpen(cmd As Control, DiagTitle As String, Filename As String, Directory As String, Filter As String) +cmd.DialogTitle = DiagTitle +cmd.Filename = Filename +cmd.InitDir = Directory +cmd.Filter = Filter +cmd.ShowOpen +End Sub + +Sub CMDShowSave(cmd As Control, DiagTitle As String, Filename As String, Directory As String, Filter As String) +cmd.DialogTitle = DiagTitle +cmd.Filename = Filename +cmd.InitDir = Directory +cmd.Filter = Filter +cmd.ShowSave +End Sub + +Sub CopyFile(SrcFile As String, DestFile As String) +Dim sourcefile As String +Dim destinationfile As String +sourcefile = SrcFile +destinationfile = DestFile +FileCopy sourcefile, destinationfile +End Sub + +Sub FullScreen(Frm As Form) +Frm.Move 0, 0, Screen.Width, Screen.Height +End Sub + + +Sub HighlightMe(Txt As TextBox) +Txt.SelStart = 0 +Txt.SelLength = Len(Txt.Text) +End Sub + +Sub ImageToClip(ImgBox As Image) +Clipboard.Clear +Clipboard.SetData ImgBox.Picture, vbCFBitmap +End Sub + +Sub LoadNewControl(Ctrl As Control, Left As Integer, Top As Integer, Indx As Integer, Visibility As Boolean) +Load Ctrl(Indx) +Ctrl(Indx).Left = Left +Ctrl(Indx).Top = Top +Ctrl(Indx).Visible = Visibility +End Sub + +Sub LoadTXTtoList(Filename As String, lst As ListBox) +Dim aLine As String +Open Filename For Input As 1 +Do Until EOF(1) + Line Input #1, aLine + If Trim$(aLine) <> "" Then lst.AddItem aLine +Loop +Close 1 +End Sub + +Sub MB(message As String) +MsgBox message +End Sub + +Sub MenuBarLine(Fram As Frame) +Fram.Width = Screen.Width + 100 +Fram.Move -50, 0 +End Sub + +Sub MPpause(MP As Control) +MP.Pause +End Sub + +Sub MPplay(MP As Control) +MP.play + +End Sub + +Sub MPstop(MP As Control) +MP.Stop +End Sub + +Sub MSCOMMdial(MSc As Control, ThePort As Integer, NumberToDial As Integer) +On Error Resume Next +MSc.commport = ThePort +MSc.PortOpen = True +PhoneNumber$ = NumberToDial +MSc.Output = "ATD" + PhoneNumber$ + Chr$(13) +End Sub + +Sub MSCOMMhangup(MSc As Control) +MSc.PortOpen = False +End Sub + +Sub NextListIndex(lst As ListBox) +On Error Resume Next +lst.ListIndex = lst.ListIndex + 1 +End Sub + +Sub OpenExe(FileNameAndPath As String) +Result = Shell("start.exe " & FileNameAndPath, vbHide) +End Sub + + +Sub OpenTXT(Filename As String, Txt As TextBox) + Dim a As String + Open Filename For Input As 1 + a = Input(LOF(1), 1) + Close 1 + Txt = a +End Sub + +Sub PicImageToClip(PicBox As PictureBox) +Clipboard.SetData PicBox.Picture, vbCFBitmap +End Sub + +Sub PicToClip(PicBox As PictureBox) +Clipboard.Clear +Clipboard.SetData PicBox.Picture, vbCFBitmap +End Sub + +Sub PrevListIndex(lst As ListBox) +On Error Resume Next +lst.ListIndex = lst.ListIndex - 1 +End Sub + +Sub RandomIt(Total As Integer) +RAN = 0 +Randomize +RAN = Int(Total * Rnd + 1) +'RandomIt (10) +'MsgBox ran + +End Sub + +Sub RemoveFromList(lst As ListBox, LstIndex As Integer) +lst.RemoveItem lst.ListIndex +End Sub + +Sub RetrieveHTML(Inet As Control, url As String, Filename As String) +Dim X +Dim strsource +strsource = Inet.OpenUrl(url) +X = Filename +Open X For Output As #1 +Print #1, strsource +Close #1 +End Sub + +Sub SaveTXT(Filename As String, Txt As TextBox) +X = Filename +Open X For Output As #1 +Print #1, Txt.Text +Close #1 + +End Sub + +Sub Scroll2Bottom(Txt As TextBox) +Txt.SelStart = Len(Txt.Text) +End Sub + +Sub SearchAndHiLite(TextToSearchFor As String, WhereToSearch As TextBox) +Dim Search, Where +Search = TextToSearchFor +Where = InStr(WhereToSearch.Text, Search) +If Where Then +WhereToSearch.SelStart = Where - 1 +WhereToSearch.SelLength = Len(Search) +End If +End Sub + +Public Sub ShowMouse() + Do + lShowCursor = lShowCursor - 1 + lRet = ShowCursor(True) + Loop Until lRet >= 0 +End Sub + +Sub StayOnTop(the As Form) +SetWinOnTop = SetWindowPos(the.hwnd, HWND_TOPMOST, 0&, 0&, 0&, 0&, Flags) +End Sub + +Sub StopAll() +Do +DoEvents +Loop +End Sub + + +Sub WSclose(WS As Control) +WS.Close +End Sub + +Sub WSconnect(WS As Control, IP As String, Port As Integer) +WS.Close +WS.Connect IP, Port +End Sub + + +Sub WSlisten(WS As Control, Port As Integer) +WS.Close +WS.LocalPort = CLng(Port) +WS.Listen +End Sub + + +Sub WSsend(WS As Control, TextToSend As String) +WS.SendData TextToSend +End Sub + + diff --git a/Module1.bas b/Module1.bas new file mode 100644 index 0000000..6b6cd57 --- /dev/null +++ b/Module1.bas @@ -0,0 +1,6 @@ +Attribute VB_Name = "Module1" +Declare Function GetShortPathName Lib "kernel32" Alias _ + "GetShortPathNameA" (ByVal lpszLongPath As String, ByVal _ + lpszShortPath As String, ByVal cchBuffer As Long) As Long + + diff --git a/Project1.PDM b/Project1.PDM new file mode 100644 index 0000000..9bd01a6 --- /dev/null +++ b/Project1.PDM @@ -0,0 +1,302 @@ +[Root] +Most Recent Package=IC1 + + +[Package|InterChat|Root] +SubWizProgID=PDWizard.SetupPkgSubWiz +BuildFolder=C:\VBSTUFF\MattsChatProg + +[Package|InterChat|Configure DAO ISAMs] +Applicable=No + +[Package|InterChat|Configure DAO ODBC] +JetWorkspace= +ODBCDirect= + +[Package|InterChat|Files Found] + +[Package|InterChat|Files Released] + +[Package|InterChat|Missing Dependency Information] + +[Package|InterChat|Out-of-Date Dependency Information] + +[Package|InterChat|Files Added] +C:\InterChat\Receive.wav= +C:\InterChat\Send.wav= + +[Package|InterChat|Files Removed] + +[Package|InterChat|Files In Project] +C:\InterChat\InterChat.exe=Yes +C:\WINDOWS\SYSTEM\MSVBVM60.DLL=Yes +C:\WINDOWS\SYSTEM\OLEAUT32.DLL=Yes +C:\WINDOWS\SYSTEM\OLEPRO32.DLL=Yes +C:\WINDOWS\SYSTEM\ASYCFILT.DLL=Yes +C:\WINDOWS\SYSTEM\STDOLE2.TLB=Yes +C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\Redist\COMCAT.DLL=Yes +C:\WINDOWS\SYSTEM\MSWINSCK.OCX=Yes +C:\WINDOWS\SYSTEM\TABCTL32.OCX=Yes +C:\WINDOWS\SYSTEM\COMDLG32.OCX=Yes +C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\SETUP.EXE=Yes +C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\SETUP1.EXE=Yes +C:\WINDOWS\SYSTEM\VB6STKIT.DLL=Yes +C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\ST6UNST.EXE=Yes +C:\InterChat\Receive.wav=Yes +C:\InterChat\Send.wav=Yes + +[Package|InterChat|Configure Registry Files] +Applicable=No + +[Package|InterChat|Configure Remote Servers] +Applicable=No + +[Package|InterChat|Install Locations] +C:\InterChat\InterChat.exe=$(AppPath) +C:\WINDOWS\SYSTEM\MSVBVM60.DLL=$(WinSysPathSysFile) +C:\WINDOWS\SYSTEM\OLEAUT32.DLL=$(WinSysPathSysFile) +C:\WINDOWS\SYSTEM\OLEPRO32.DLL=$(WinSysPathSysFile) +C:\WINDOWS\SYSTEM\ASYCFILT.DLL=$(WinSysPathSysFile) +C:\WINDOWS\SYSTEM\STDOLE2.TLB=$(WinSysPathSysFile) +C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\Redist\COMCAT.DLL=$(WinSysPathSysFile) +C:\WINDOWS\SYSTEM\MSWINSCK.OCX=$(WinSysPath) +C:\WINDOWS\SYSTEM\TABCTL32.OCX=$(WinSysPath) +C:\WINDOWS\SYSTEM\COMDLG32.OCX=$(WinSysPath) +C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\SETUP.EXE=$(AppPath) +C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\SETUP1.EXE=$(WinPath) +C:\WINDOWS\SYSTEM\VB6STKIT.DLL=$(WinSysPathSysFile) +C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\ST6UNST.EXE=$(WinPath) +C:\InterChat\Receive.wav=$(AppPath) +C:\InterChat\Send.wav=$(AppPath) + +[Package|InterChat|Configure Shared Files] +Applicable=Yes +C:\InterChat\InterChat.exe=No +C:\InterChat\Receive.wav=No +C:\InterChat\Send.wav=No + +[Package|InterChat|Distribution] +Type=single +Size= +Title=InterChat v1.0 + +[Package|InterChat|IconGroups] +Group0=InterChat +PrivateGroup0=False +Parent0=$(Programs) + +[Package|InterChat|InterChat] +Icon1=InterChat.exe +Title1=InterChat v1.0 +StartIn1=$(AppPath) +Key1=Icon5 + +[Package|InterChat|Package] +PackageFolder=C:\VBSTUFF\MattsChatProg +ProjectFolder=C:\VBSTUFF\MattsChatProg +ServerSideCab= +File1=C:\VBSTUFF\MattsChatProg\setup.exe +File2=C:\VBSTUFF\MattsChatProg\Setup.Lst +File3=C:\VBSTUFF\MattsChatProg\InterChat.CAB +Handler1=PDWizard.FolderDplySubWiz +Handler2=PDWizard.WebPostDplySubWiz + + +[Package|InterChat2|Root] +SubWizProgID=PDWizard.SetupPkgSubWiz +BuildFolder=C:\WINDOWS\Desktop\InterChat + +[Package|InterChat2|Configure DAO ISAMs] +Applicable=No + +[Package|InterChat2|Configure DAO ODBC] +JetWorkspace= +ODBCDirect= + +[Package|InterChat2|Files Found] +Receive.wav=C:\WINDOWS\Desktop\InterChat\Receive.wav +Send.wav=C:\WINDOWS\Desktop\InterChat\Send.wav + +[Package|InterChat2|Files Released] + +[Package|InterChat2|Missing Dependency Information] + +[Package|InterChat2|Out-of-Date Dependency Information] + +[Package|InterChat2|Files Added] +receive.wav= +send.wav= + +[Package|InterChat2|Files Removed] + +[Package|InterChat2|Files In Project] +C:\WINDOWS\SYSTEM\MSVBVM60.DLL=Yes +C:\WINDOWS\SYSTEM\OLEAUT32.DLL=Yes +C:\WINDOWS\SYSTEM\OLEPRO32.DLL=Yes +C:\WINDOWS\SYSTEM\ASYCFILT.DLL=Yes +C:\WINDOWS\SYSTEM\STDOLE2.TLB=Yes +C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\Redist\COMCAT.DLL=Yes +C:\WINDOWS\SYSTEM\MSWINSCK.OCX=Yes +C:\WINDOWS\SYSTEM\TABCTL32.OCX=Yes +C:\WINDOWS\SYSTEM\COMDLG32.OCX=Yes +C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\SETUP.EXE=Yes +C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\SETUP1.EXE=Yes +C:\WINDOWS\SYSTEM\VB6STKIT.DLL=Yes +C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\ST6UNST.EXE=Yes +C:\VBSTUFF\MattsChatProg\InterChat.exe=Yes +C:\WINDOWS\Desktop\InterChat\Receive.wav=Yes +C:\WINDOWS\Desktop\InterChat\Send.wav=Yes + +[Package|InterChat2|Configure Registry Files] +Applicable=No + +[Package|InterChat2|Configure Remote Servers] +Applicable=No + +[Package|InterChat2|Install Locations] +C:\InterChat\InterChat.exe=$(AppPath) +C:\WINDOWS\SYSTEM\MSVBVM60.DLL=$(WinSysPathSysFile) +C:\WINDOWS\SYSTEM\OLEAUT32.DLL=$(WinSysPathSysFile) +C:\WINDOWS\SYSTEM\OLEPRO32.DLL=$(WinSysPathSysFile) +C:\WINDOWS\SYSTEM\ASYCFILT.DLL=$(WinSysPathSysFile) +C:\WINDOWS\SYSTEM\STDOLE2.TLB=$(WinSysPathSysFile) +C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\Redist\COMCAT.DLL=$(WinSysPathSysFile) +C:\WINDOWS\SYSTEM\MSWINSCK.OCX=$(WinSysPath) +C:\WINDOWS\SYSTEM\TABCTL32.OCX=$(WinSysPath) +C:\WINDOWS\SYSTEM\COMDLG32.OCX=$(WinSysPath) +C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\SETUP.EXE=$(AppPath) +C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\SETUP1.EXE=$(WinPath) +C:\WINDOWS\SYSTEM\VB6STKIT.DLL=$(WinSysPathSysFile) +C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\ST6UNST.EXE=$(WinPath) +C:\InterChat\Receive.wav=$(AppPath) +C:\InterChat\Send.wav=$(AppPath) +C:\VBSTUFF\MattsChatProg\InterChat.exe=$(AppPath) +C:\WINDOWS\Desktop\InterChat\Receive.wav=$(AppPath) +C:\WINDOWS\Desktop\InterChat\Send.wav=$(AppPath) + +[Package|InterChat2|Configure Shared Files] +Applicable=Yes +C:\InterChat\InterChat.exe=No +C:\InterChat\Receive.wav=No +C:\InterChat\Send.wav=No +C:\VBSTUFF\MattsChatProg\InterChat.exe=No +C:\WINDOWS\Desktop\InterChat\Receive.wav=No +C:\WINDOWS\Desktop\InterChat\Send.wav=No + +[Package|InterChat2|Distribution] +Type=single +Size= +Title=InterChat v1.0 + +[Package|InterChat2|Package] +PackageFolder=C:\WINDOWS\Desktop\InterChat +ProjectFolder=C:\VBSTUFF\MattsChatProg +ServerSideCab= +File1=C:\WINDOWS\Desktop\InterChat\setup.exe +File2=C:\WINDOWS\Desktop\InterChat\Setup.Lst +File3=C:\WINDOWS\Desktop\InterChat\InterChat.CAB +Handler1=PDWizard.FolderDplySubWiz +Handler2=PDWizard.WebPostDplySubWiz + +[Package|InterChat2|IconGroups] +Group0=InterChat +PrivateGroup0=False +Parent0=$(Programs) + +[Package|InterChat2|InterChat] +Icon1=InterChat.exe +Title1=InterChat v1.0 +StartIn1=$(AppPath) +Key1=Icon5 + + +[Package|IC1|Root] +SubWizProgID=PDWizard.SetupPkgSubWiz +BuildFolder=C:\WINDOWS\Desktop\InterChat + +[Package|IC1|Configure DAO ISAMs] +Applicable=No + +[Package|IC1|Configure DAO ODBC] +JetWorkspace= +ODBCDirect= + +[Package|IC1|Files Found] + +[Package|IC1|Files Released] + +[Package|IC1|Missing Dependency Information] + +[Package|IC1|Out-of-Date Dependency Information] + +[Package|IC1|Files Added] + +[Package|IC1|Files Removed] + +[Package|IC1|Files In Project] +C:\VBSTUFF\MattsChatProg\InterChat.exe=Yes +C:\WINDOWS\SYSTEM\MSVBVM60.DLL=Yes +C:\WINDOWS\SYSTEM\OLEAUT32.DLL=Yes +C:\WINDOWS\SYSTEM\OLEPRO32.DLL=Yes +C:\WINDOWS\SYSTEM\ASYCFILT.DLL=Yes +C:\WINDOWS\SYSTEM\STDOLE2.TLB=Yes +C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\Redist\COMCAT.DLL=Yes +C:\WINDOWS\SYSTEM\MSWINSCK.OCX=Yes +C:\WINDOWS\SYSTEM\TABCTL32.OCX=Yes +C:\WINDOWS\SYSTEM\COMDLG32.OCX=Yes +C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\SETUP.EXE=Yes +C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\SETUP1.EXE=Yes +C:\WINDOWS\SYSTEM\VB6STKIT.DLL=Yes +C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\ST6UNST.EXE=Yes + +[Package|IC1|Configure Registry Files] +Applicable=No + +[Package|IC1|Configure Remote Servers] +Applicable=No + +[Package|IC1|Install Locations] +C:\VBSTUFF\MattsChatProg\InterChat.exe=$(AppPath) +C:\WINDOWS\SYSTEM\MSVBVM60.DLL=$(WinSysPathSysFile) +C:\WINDOWS\SYSTEM\OLEAUT32.DLL=$(WinSysPathSysFile) +C:\WINDOWS\SYSTEM\OLEPRO32.DLL=$(WinSysPathSysFile) +C:\WINDOWS\SYSTEM\ASYCFILT.DLL=$(WinSysPathSysFile) +C:\WINDOWS\SYSTEM\STDOLE2.TLB=$(WinSysPathSysFile) +C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\Redist\COMCAT.DLL=$(WinSysPathSysFile) +C:\WINDOWS\SYSTEM\MSWINSCK.OCX=$(WinSysPath) +C:\WINDOWS\SYSTEM\TABCTL32.OCX=$(WinSysPath) +C:\WINDOWS\SYSTEM\COMDLG32.OCX=$(WinSysPath) +C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\SETUP.EXE=$(AppPath) +C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\SETUP1.EXE=$(WinPath) +C:\WINDOWS\SYSTEM\VB6STKIT.DLL=$(WinSysPathSysFile) +C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\ST6UNST.EXE=$(WinPath) + +[Package|IC1|Configure Shared Files] +Applicable=Yes +C:\VBSTUFF\MattsChatProg\InterChat.exe=No + +[Package|IC1|Distribution] +Type=single +Size= +Title=InterChat v1.0 + +[Package|IC1|IconGroups] +Group0=InterChat +PrivateGroup0=True +Parent0=$(Programs) + +[Package|IC1|InterChat] +Icon1=InterChat.exe +Title1=InterChat v1.0 +StartIn1=$(AppPath) +Key1=Icon1 + +[Package|IC1|Package] +PackageFolder=C:\WINDOWS\Desktop\InterChat +ProjectFolder=C:\VBSTUFF\MattsChatProg +ServerSideCab= +File1=C:\WINDOWS\Desktop\InterChat\setup.exe +File2=C:\WINDOWS\Desktop\InterChat\Setup.Lst +File3=C:\WINDOWS\Desktop\InterChat\InterChat.CAB +Handler1=PDWizard.FolderDplySubWiz +Handler2=PDWizard.WebPostDplySubWiz diff --git a/Project1.vbp b/Project1.vbp new file mode 100644 index 0000000..3c28ece --- /dev/null +++ b/Project1.vbp @@ -0,0 +1,43 @@ +Type=Exe +Form=Form1.frm +Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\WINDOWS\SYSTEM\STDOLE2.TLB#OLE Automation +Object={248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0; MSWINSCK.OCX +Object={BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0; TABCTL32.OCX +Object={EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0; SHDOCVW.DLL +Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; COMDLG32.OCX +Module=Module1; Module1.bas +Module=MattsBAS; MattsBAS.bas +Module=XMessagerIPbas; ip.bas +IconForm="Form1" +Startup="Form1" +HelpFile="" +Title="InterChat" +ExeName32="InterChat.exe" +Command32="" +Name="Project1" +HelpContextID="0" +CompatibleMode="0" +MajorVer=1 +MinorVer=0 +RevisionVer=0 +AutoIncrementVer=0 +ServerSupportFiles=0 +VersionCompanyName="Surreal Entertainment Software" +VersionFileDescription="Chat/File Transfer Application" +VersionLegalCopyright="©Copyright 2000, Surreal Entertainment Software" +VersionProductName="InterChat" +CompilationType=0 +OptimizationType=0 +FavorPentiumPro(tm)=0 +CodeViewDebugInfo=0 +NoAliasing=0 +BoundsCheck=0 +OverflowCheck=0 +FlPointCheck=0 +FDIVCheck=0 +UnroundedFP=0 +StartMode=0 +Unattended=0 +Retained=0 +ThreadPerObject=0 +MaxNumberOfThreads=1 diff --git a/Project1.vbw b/Project1.vbw new file mode 100644 index 0000000..b617a4c --- /dev/null +++ b/Project1.vbw @@ -0,0 +1,4 @@ +Form1 = 41, 107, 423, 459, C, 85, 43, 430, 279, C +Module1 = 154, 154, 536, 506, C +MattsBAS = 0, 0, 0, 0, C +XMessagerIPbas = 0, 0, 0, 0, C diff --git a/README.md b/README.md new file mode 100644 index 0000000..8dd444e --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +