VERSION 5.00
Object = "{0D452EE1-E08F-101A-852E-02608C4D0BB4}#2.0#0"; "FM20.DLL"
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "Richtx32.ocx"
Begin VB.Form aimIM 
   ClientHeight    =   4095
   ClientLeft      =   5145
   ClientTop       =   2955
   ClientWidth     =   4455
   Icon            =   "aimIM.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   4095
   ScaleWidth      =   4455
   Begin VB.CommandButton Command7 
      Caption         =   "Remote Control"
      Height          =   615
      Left            =   1080
      TabIndex        =   6
      ToolTipText     =   "Start the Remote Controller, which will start an online session with the current user"
      Top             =   3360
      Width           =   855
   End
   Begin VB.CommandButton Command1 
      Caption         =   "&Info"
      Height          =   615
      Left            =   3000
      TabIndex        =   3
      Top             =   3360
      Width           =   615
   End
   Begin VB.Frame Frame1 
      Height          =   3255
      Left            =   120
      TabIndex        =   8
      Top             =   0
      Visible         =   0   'False
      Width           =   4215
      Begin VB.CommandButton Command6 
         Caption         =   "&Cancel"
         Height          =   615
         Left            =   2880
         TabIndex        =   12
         Top             =   1680
         Width           =   1215
      End
      Begin VB.CommandButton Command5 
         Caption         =   "&Normal Warning"
         Height          =   615
         Left            =   1560
         TabIndex        =   11
         Top             =   1680
         Width           =   1215
      End
      Begin VB.CommandButton Command4 
         Caption         =   "Warn &Anonymously"
         Height          =   615
         Left            =   240
         TabIndex        =   10
         Top             =   1680
         Width           =   1215
      End
      Begin VB.Label Label1 
         Alignment       =   2  'Center
         Caption         =   "Would you like to warn this user anonymously? Anonymous warnings are less effective."
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   12
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   1575
         Left            =   120
         TabIndex        =   9
         Top             =   240
         Width           =   3975
      End
   End
   Begin VB.CommandButton Command3 
      Caption         =   "&Block"
      Enabled         =   0   'False
      Height          =   615
      Left            =   1800
      Picture         =   "aimIM.frx":08CA
      Style           =   1  'Graphical
      TabIndex        =   5
      Top             =   3960
      Visible         =   0   'False
      Width           =   735
   End
   Begin VB.CommandButton Command2 
      Caption         =   "&Warn!"
      Height          =   615
      Left            =   2280
      Picture         =   "aimIM.frx":0E64
      Style           =   1  'Graphical
      TabIndex        =   4
      Top             =   3360
      Width           =   615
   End
   Begin VB.CommandButton cmdSend 
      Caption         =   "&Send"
      Default         =   -1  'True
      DownPicture     =   "aimIM.frx":151E
      Height          =   615
      Left            =   3720
      Picture         =   "aimIM.frx":25D4
      Style           =   1  'Graphical
      TabIndex        =   2
      Top             =   3360
      Width           =   615
   End
   Begin RichTextLib.RichTextBox rtfSend 
      Height          =   975
      Left            =   120
      TabIndex        =   0
      Top             =   2280
      Width           =   4215
      _ExtentX        =   7435
      _ExtentY        =   1720
      _Version        =   393217
      ScrollBars      =   2
      DisableNoScroll =   -1  'True
      AutoVerbMenu    =   -1  'True
      TextRTF         =   $"aimIM.frx":368A
   End
   Begin RichTextLib.RichTextBox rtfDisplay 
      Height          =   2055
      Left            =   120
      TabIndex        =   1
      Top             =   120
      Width           =   4215
      _ExtentX        =   7435
      _ExtentY        =   3625
      _Version        =   393217
      ScrollBars      =   2
      DisableNoScroll =   -1  'True
      AutoVerbMenu    =   -1  'True
      TextRTF         =   $"aimIM.frx":370C
   End
   Begin MSForms.ToggleButton RSession 
      Height          =   615
      Left            =   120
      TabIndex        =   7
      ToolTipText     =   "Choose this to allow remote commands from this user, for a remote session"
      Top             =   3360
      Width           =   855
      BackColor       =   -2147483633
      ForeColor       =   -2147483630
      DisplayStyle    =   6
      Size            =   "1508;1085"
      Value           =   "0"
      Caption         =   "Remote Session"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
End
Attribute VB_Name = "aimIM"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'AIM code originally by
'Chad J. Cox (of DosFX) and Tom Grimshaw
'
'code modified by FollowTheWatch55 for VH

Option Explicit

Private Sub cmdSend_Click()
  If rtfSend.Text <> "" And aimSignOn.wskAIM.State = sckConnected Then
    Call SendProc(2, "toc2_send_im " & Me.Tag & " " & Chr(34) & Normalize("<HTML>" & rtfSend.Text & "</HTML>") & Chr(34) & Chr(0))
        Call RTFUpdate(rtfDisplay, htmltorich2("<font color=""#0000FF"" size=3>" + m_strFormattedSN$ + " </font><font color=""#000000"" size=3 face=""times new roman""></p>" + rtfSend.Text))
    rtfSend.Text = ""
    Call PlayWav(strSoundIMOut$)
  End If
End Sub

Private Sub Command1_Click()
        Dim km As Integer
        
        aimInfo.Show
        km = InStr(1, Me.Caption, "-")
        
        
        If km <> 0 Then
        aimInfo.WhoInfo.Text = Left$(Me.Caption, km - 1)
        Else
       aimInfo.WhoInfo.Text = Me.Caption
         End If
        
        aimInfo.Caption = "Buddy Info: " & aimInfo.WhoInfo.Text
        Call SendProc(2, "toc_get_info " & Chr(34) & aimInfo.WhoInfo.Text & Chr(34) & Chr(0))

End Sub

Private Sub Command2_Click()
Command3.Enabled = False
Command1.Enabled = False
Command2.Enabled = False

cmdSend.Enabled = False
Frame1.Visible = True

End Sub

Private Sub Command4_Click()
Call SendProc(2, "toc_evil " & Me.Tag & " " & "anon" & Chr(0))
Frame1.Visible = False
Command3.Enabled = True
Command1.Enabled = True
cmdSend.Enabled = True
Command2.Enabled = True

End Sub

Private Sub Command5_Click()
Call SendProc(2, "toc_evil " & Me.Tag & " " & "norm" & Chr(0))
Frame1.Visible = False
Command3.Enabled = True
Command1.Enabled = True
cmdSend.Enabled = True
Command2.Enabled = True
End Sub

Private Sub Command6_Click()
Frame1.Visible = False
Command3.Enabled = True
Command1.Enabled = True
cmdSend.Enabled = True
Command2.Enabled = True
End Sub

Private Sub Command7_Click()
ClientSN = Me.Tag
ChatRoom = False
frmRemote.Show
End Sub

Private Sub Form_Activate()
If ServerSN <> "" And Me.Tag <> ServerSN Then RSession.Enabled = False Else RSession.Enabled = True
End Sub

Private Sub Form_Load()
  Me.Left = (ScreenX / 2) - (Me.Width / 2)
  Me.Top = (ScreenY / 2) - (Me.Height / 2)
End Sub

Private Sub Form_Resize()
  If Me.WindowState <> 1 Then
    If Me.Width < 4530 Then Me.Width = 4530
    If Me.Height < 4530 Then Me.Height = 4530 '4000
    rtfDisplay.Width = Me.Width - 260
    rtfDisplay.Height = Me.Height - 2205
    rtfSend.Width = Me.Width - 260
    rtfSend.Top = Me.Height - 2100 '1980
    cmdSend.Left = Me.Width - 855
    cmdSend.Top = Me.Height - 1110 '900
    'cmdSend.Left = Me.Width - (cmdSend.Width + 100)
    Command1.Top = cmdSend.Top
    Command1.Left = cmdSend.Left - 720
    RSession.Top = cmdSend.Top
    RSession.Left = 120
    Command7.Top = cmdSend.Top
    Command7.Left = 1080
    Frame1.Height = rtfSend.Top + rtfSend.Height
    Frame1.Width = rtfSend.Width

    Command2.Top = cmdSend.Top
    Command2.Left = cmdSend.Left - 1440
    Command3.Top = cmdSend.Top
    'Command 1 is Get Info feature, added by Steve.
    'Command 2 is Warn feature, added by Tom.
    'Command 3 is Block feature, added by Tom.
    'cmdSend
  End If
End Sub

Private Sub RSession_Click()
If SynthSpeech = True And UseSAPI5 = False And frmSession.chkEnableChar.Value = 1 And CharacterFile = "" Then MsgBox "Please choose a character file", vbOKOnly + vbInformation, "Virtual Hypnotist": RSession.Value = False: Exit Sub
If frmSession.chkEnableVideo.Value = 1 And VideoFile = "" Then MsgBox "Please choose a video file", vbOKOnly + vbInformation, "Virtual Hypnotist": RSession.Value = False: Exit Sub
If frmSession.chkEnableSubliminals.Value = 1 And SubliminalsFile = "" Then MsgBox "Please choose a subliminals file", vbOKOnly + vbInformation, "Virtual Hypnotist": RSession.Value = False: Exit Sub
If frmSession.chkEnableAudio.Value = 1 And AudioFile = "" Then MsgBox "Please choose an audio file", vbOKOnly + vbInformation, "Virtual Hypnotist": RSession.Value = False: Exit Sub
If frmSession.chkEnableCustom.Value = 1 And frmSession.txtCustomAudio.Text = "" Then MsgBox "Please choose a custom audio file by clicking the Session Types button", vbOKOnly + vbInformation, "Virtual Hypnotist": RSession.Value = False: Exit Sub

If RSession.Value = True Then
    ServerSN = Me.Tag
Else
    ServerSN = ""
    InSession = False
End If
End Sub

Private Sub rtfSend_KeyPress(KeyAscii As Integer)
  If KeyAscii = 13 Then
    
    If rtfSend.Text <> "" And aimSignOn.wskAIM.State = sckConnected Then
    Call SendProc(2, "toc2_send_im " & Me.Tag & " " & Chr(34) & Normalize("<HTML>" & rtfSend.Text & "</HTML>") & Chr(34) & Chr(0))
        Call RTFUpdate(rtfDisplay, htmltorich2("<font color=""#0000FF"" size=3>" + m_strFormattedSN$ + " </font><font color=""#000000"" size=3 face=""times new roman""></p>" + rtfSend.Text))
    rtfSend.Text = ""
    Call PlayWav(strSoundIMOut$)

    End If
    KeyAscii = 0
  End If
End Sub
