📄 myim.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form MyIM
Caption = "ComX I.M."
ClientHeight = 4905
ClientLeft = 165
ClientTop = 750
ClientWidth = 2775
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Icon = "MyIM.frx":0000
LinkTopic = "Form1"
ScaleHeight = 4905
ScaleWidth = 2775
StartUpPosition = 3 'Windows Default
Begin MSComDlg.CommonDialog CommonDialog
Left = 2280
Top = 3960
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.Timer BuddyUpdater
Enabled = 0 'False
Interval = 15000
Left = 720
Top = 3960
End
Begin MSWinsockLib.Winsock Winsock1
Left = 1200
Top = 3960
_ExtentX = 741
_ExtentY = 741
_Version = 393216
RemoteHost = "127.0.0.1"
RemotePort = 6000
End
Begin VB.PictureBox Picture1
Align = 2 'Align Bottom
Height = 255
Left = 0
ScaleHeight = 195
ScaleWidth = 2715
TabIndex = 3
Top = 4650
Width = 2775
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Ready."
Height = 195
Left = 120
TabIndex = 5
Top = 0
Width = 525
End
End
Begin VB.CommandButton Command2
Enabled = 0 'False
Height = 495
Left = 495
Picture = "MyIM.frx":0442
Style = 1 'Graphical
TabIndex = 2
ToolTipText = " Change my Status "
Top = 0
Width = 495
End
Begin VB.CommandButton Command1
Enabled = 0 'False
Height = 495
Left = 0
Picture = "MyIM.frx":058C
Style = 1 'Graphical
TabIndex = 1
ToolTipText = " Send a Message "
Top = 0
Width = 495
End
Begin MSComctlLib.ImageList ImageList1
Left = 1680
Top = 3840
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 5
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "MyIM.frx":06D6
Key = "Online"
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "MyIM.frx":0C28
Key = "Offline"
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "MyIM.frx":0F7A
Key = "Away"
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "MyIM.frx":12CC
Key = "DND"
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "MyIM.frx":161E
Key = "Unknown"
EndProperty
EndProperty
End
Begin MSComctlLib.TreeView TreeView1
Height = 2295
Left = 0
TabIndex = 0
Top = 480
Width = 2415
_ExtentX = 4260
_ExtentY = 4048
_Version = 393217
HideSelection = 0 'False
Indentation = 353
LabelEdit = 1
Sorted = -1 'True
Style = 7
HotTracking = -1 'True
ImageList = "ImageList1"
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.Label Label1
Alignment = 1 'Right Justify
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Offline"
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 195
Left = 2085
TabIndex = 4
Top = 150
Width = 540
End
Begin VB.Shape Shape1
BackColor = &H00808080&
BackStyle = 1 'Opaque
BorderColor = &H00808080&
Height = 495
Left = 0
Top = 0
Width = 2775
End
Begin VB.Menu mnuFile
Caption = "&File"
Begin VB.Menu mnuFileToggleLog
Caption = "&Log On"
End
Begin VB.Menu mnuFilePassword
Caption = "Change &Password"
Enabled = 0 'False
End
Begin VB.Menu mnuFileChangeInfo
Caption = "Change My &Info"
Enabled = 0 'False
End
Begin VB.Menu mnuFileReport
Caption = "&Report..."
Enabled = 0 'False
End
Begin VB.Menu mnuFileSplit
Caption = "-"
End
Begin VB.Menu mnuStatus
Caption = "My &Status"
Enabled = 0 'False
Begin VB.Menu mnuStatusOnline
Caption = "&Online"
Checked = -1 'True
End
Begin VB.Menu mnuStatusAway
Caption = "&Away"
End
Begin VB.Menu mnuStatusDND
Caption = "&Do Not Disturb"
End
Begin VB.Menu mnuStatusSplit
Caption = "-"
End
Begin VB.Menu mnuStatusInvisible
Caption = "&Invisible"
End
End
Begin VB.Menu mnuFileSplit1
Caption = "-"
End
Begin VB.Menu mnuFileClose
Caption = "&Close"
End
End
Begin VB.Menu mnuBuddy
Caption = "&Buddy"
Begin VB.Menu mnuBuddyMessage
Caption = "Send &Message"
Enabled = 0 'False
End
Begin VB.Menu mnuBuddyChat
Caption = "Real Time &Chat"
Enabled = 0 'False
End
Begin VB.Menu mnuBuddyFile
Caption = "Transfer &File"
Enabled = 0 'False
End
Begin VB.Menu mnuBuddyInfo
Caption = "&User Info"
Enabled = 0 'False
End
Begin VB.Menu mnuBuddySplit
Caption = "-"
End
Begin VB.Menu mnuBuddyAdd
Caption = "&Add Buddy"
Enabled = 0 'False
End
Begin VB.Menu mnuBuddyRemove
Caption = "&Remove Buddy"
Enabled = 0 'False
End
Begin VB.Menu mnuBuddyIgnore
Caption = "&Ignore List"
Enabled = 0 'False
End
End
Begin VB.Menu mnuOther
Caption = "&Other"
Visible = 0 'False
Begin VB.Menu mnuOtherChatFile
Caption = "&Community Chat/File Search"
Enabled = 0 'False
End
End
Begin VB.Menu mnuHelp
Caption = "&Help"
Begin VB.Menu mnuHelpHomePage
Caption = "ComX &Home Page"
End
Begin VB.Menu mnuAbout
Caption = "&About..."
End
End
End
Attribute VB_Name = "MyIM"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public NewUser As Boolean
Public ImageAnimateNumber As Integer
Private Sub BuddyUpdater_Timer()
On Error Resume Next
Label2.Caption = "Checking buddy... (0/" & TreeView1.Nodes.Count & ")"
For i = 1 To TreeView1.Nodes.Count
Label2.Caption = "Checking buddy... (" & i & "/" & TreeView1.Nodes.Count & ")"
Winsock1.SendData ".getstatus " & TreeView1.Nodes(i).Key
DoEvents
Next
Label2.Caption = ""
End Sub
Private Sub Command1_Click()
mnuBuddyMessage_Click
End Sub
Private Sub Command2_Click()
PopupMenu mnuStatus, , Command2.Left, Command2.Top + Command2.Height
End Sub
Private Sub Form_Load()
Me.Caption = "ComX Version " & App.Major & "." & App.Minor & App.Revision
gFileNum = FreeFile
End Sub
Private Sub Form_Resize()
On Error Resume Next
Shape1.Width = Me.ScaleWidth
Label1.Left = Me.ScaleWidth - Label1.Width - 120
TreeView1.Width = Me.ScaleWidth
TreeView1.Height = Me.ScaleHeight - Shape1.Height - Picture1.Height
End Sub
Private Sub Form_Unload(cancel As Integer)
Winsock1.Close
End
End Sub
Private Sub mnuAbout_Click()
MsgBox "ComX is in very early development and many things simply don't work yet seeing as I'm having trouble implementing them. This program has been coded by The Reaper based on several others source codes. A more detailed description is available at the website.", vbInformation
End Sub
Private Sub mnuBuddyAdd_Click()
Dim Temp As String
Temp = InputBox("Who's your new buddy?", "Add Buddy", "TheReaper")
If Temp = "" Then
Exit Sub
Else
Winsock1.SendData ".AddBuddy " & Connect.Text1.Text & " " & Temp
End If
End Sub
Private Sub mnuBuddyChat_Click()
On Error GoTo BuddyChatErr
RTChatRemoteNick = TreeView1.SelectedItem
Winsock1.SendData ".GetIPForRTChat " & TreeView1.SelectedItem.Key
Exit Sub
BuddyChatErr:
If Err.Number = 91 Then
MsgBox "You didn't select a buddy."
Else
MsgBox Err.Number & ":" & Err.Description
End If
End Sub
Private Sub mnuBuddyFile_Click()
On Error GoTo BuddyFileErr
FileSendRemoteNick = TreeView1.SelectedItem
'MsgBox FileSendRemoteNick
Winsock1.SendData ".GetIPForFileSend " & TreeView1.SelectedItem.Key
Exit Sub
BuddyFileErr:
If Err.Number = 91 Then
MsgBox "You didn't select a buddy."
Else
MsgBox Err.Number & ":" & Err.Description
End If
End Sub
Private Sub mnuBuddyIgnore_Click()
frmIgnore.Show
End Sub
Private Sub mnuBuddyInfo_Click()
On Error GoTo BuddyInfoErr
RemoteNick = TreeView1.SelectedItem
Winsock1.SendData ".GetBuddyInfo " & TreeView1.SelectedItem.Key
Exit Sub
BuddyInfoErr:
If Err.Number = 91 Then
MsgBox "You didn't select a buddy."
Else
MsgBox Err.Number & ":" & Err.Description
End If
End Sub
Private Sub mnuBuddyMessage_Click()
On Error Resume Next
Dim NewIMessage As New IMessage
NewIMessage.Show ownerform:=Me
NewIMessage.Label2.Caption = TreeView1.SelectedItem
NewIMessage.RecieversID = TreeView1.SelectedItem.Key
End Sub
Private Sub mnuBuddyRemove_Click()
On Error Resume Next
Winsock1.SendData ".RemoveBuddy " & TreeView1.SelectedItem.Key
End Sub
Private Sub mnuFileClose_Click()
Unload Me
End Sub
Private Sub mnuFilePassword_Click()
Dim Temp As String
Temp = InputBox("What will the new password be?", "Change Password", Connect.Text2.Text)
If Temp = "" Then
Exit Sub
Else
Winsock1.SendData ".ChangePassword " & " " & Temp
End If
End Sub
Private Sub mnuFileReport_Click()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -