你需要的是这个。
https://github.com/klog/ycs
我发现了一些关于这个 OCX 的 VB6 代码。将它转换为 C# 会很容易。这是使用此 OCX 的某种 Yahoo Chatroom 客户端
Private Sub Command1_Click ()
Call YMSG1.Connect (User.Text, Pass.Text)
End Sub
Private Sub Command2_Click ()
Call YMSG1.PckChangeStatus (TXTST.Text, False)
End Sub
Private Sub Command3_Click ()
Call YMSG1.PckSendTextRoom (pmtoroom.Text)
End Sub
Private Sub Command4_Click ()
List1.Clear
Call YMSG1.PckJoindRoom (Toroom.Text)
End Sub
Private Sub Command5_Click ()
Call YMSG1.PckLeftRoom
End Sub
Private Sub Form_Load ()
Call YMSG1.Invisible (True)
End Sub
Private Sub lblst_Change ()
If lblst.Caption = "login." Then
YMSG1.ConvertFarsi = True
YMSG1.FilterMessage = True
End If
End Sub
Private Sub mnuAbut_Click ()
abut.Show
End Sub
Private Sub Timer1_Timer ()
On Error GoTo Eror
Call YMSG1.PckSendTextRoom (PM2Room.Text)
Eror:
End Sub
Private Sub YMSG1_IncomingAddRequest (ByVal From As String, ByVal ToUser As String, ByVal Message As String, ByVal SenderName As Variant, ByVal SenderLastName As String, ByVal AutoAdd As Boolean)
YMSG1.PckAcceptAdd From, ToUser
Call YMSG1.PckSendMsg (From, txtadd.Text)
End Sub
Private Sub YMSG1_IncomingAppear (ByVal User As String, ByVal Status As YMSGMode_V2.StatusYID, Messege As String)
If Status = Available Then Call YMSG1.PckSendMsg (User, txtOnline.Text)
End Sub
Private Sub YMSG1_IncomingCaptcha (ByVal PictureLink As String, ByVal DATA As String)
Form2.Web.Navigate "http://captcha.chat.yahoo.com/go/captchat/?img =" & PictureLink & "&. Intl = us &. Lang = en-US"
Form2.Show
Timer1.Interval = "30000"
End Sub
Private Sub YMSG1_IncomingChatList (ByVal ChatterLst As String, ByVal Status As YMSGMode_V2.StatusRoom, ByVal DATA As String)
If Status = Joind Then
List1.AddItem ChatterLst
List2.AddItem ChatterLst & "Join Room"
Call YMSG1.PckSendMsg (ChatterLst, txtWel.Text)
lblUser.Caption = "Users:" & List1.ListCount
ElseIf Status = Leave Then
List2.AddItem ChatterLst & "Left Room"
Call YMSG1.PckSendMsg (ChatterLst, txtWel.Text)
For i = 0 To List1.ListCount - 1
If List1.List (i) = ChatterLst Then
List1.RemoveItem i
End If
Next i
lblUser.Caption = "Users:" & List1.ListCount
ElseIf Status = RoomFull Then
MsgBox ("Room The Full")
End If
End Sub
Private Sub YMSG1_IncomingMessage (ByVal From As String, ByVal ToUser As String, ByVal TextMessage As String)
Call YMSG1.PckSendMsg (From, txtrespones.Text)
End Sub
Private Sub YMSG1_IncomingRoomTxtMessage (ByVal FromUser As String, ByVal Msg As String, ByVal Client As String, ByVal RoomName As String, ByVal DATA As String)
List2.AddItem FromUser & ":" & Msg
End Sub
Private Sub YMSG1_Status (ByVal MsgStatus As String, ByVal Status As String, ByVal Connecting As Boolean)
lblst.Caption = MsgStatus
End Sub
这是一些图片