【問題】請問VB改即時通狀態的問題..


Recommended Posts

小弟我是用VB6的...

剛剛爬文也抓了Yahoo! Messenger SDK的說明

在VB裡...引用元件先加入Yahoo! Messenger TypeLib

之後宣告Dim a As YahooMessengerLib.IStatus

然後我就摸不著頭緒了:'(

好像要作初始的工作...

有寫過這類程式的高手...可以提示我一下嗎?^o)

鏈接文章
分享到其他網站
  • 3 weeks later...

剛溫嗄~~~

感謝你的解說

其實只有有這幾行就夠了

Dim yahoo As New Messenger2

Private Sub Form_Load()

NoReturn (yahoo.Me.Status.SetCustomStatus("我要打的狀態", 0, Null, Null)) '其中0是指狀態,0是空閑,1是忙碌

End Sub

Sub NoReturn(a)

End Sub

鏈接文章
分享到其他網站
  • 8 months later...

Dim ch As Boolean

Dim ti As Integer

Dim yahoo As New Messenger2

Dim ccc As Integer

Private Sub Command1_Click()

If Check1.Value = 0 Then

List1.AddItem 0 & Text1.Text

Else

List1.AddItem 1 & Text1.Text

End If

List1.ListIndex = List1.NewIndex

End Sub

Private Sub Command2_Click()

If List1.ListIndex <> -1 Then

List1.RemoveItem List1.ListIndex

If List1.NewIndex <> -1 Then

List1.ListIndex = List1.NewIndex + 1

End If

End If

End Sub

Private Sub Command3_Click()

Timer1.Interval = Val(Combo1.Text) * 1000

Timer1.Enabled = True

End Sub

Private Sub Command4_Click()

Timer1.Enabled = False

End Sub

Private Sub Command5_Click()

If List1.ListIndex = -1 Or List1.ListIndex = 0 Then

Exit Sub

End If

tmpstr = List1

tmpsqr = List1.ListIndex

List1.RemoveItem List1.ListIndex

List1.AddItem tmpstr, tmpsqr - 1

List1.ListIndex = tmpsqr - 1

End Sub

Private Sub Form_Load()

Dim str As String

On Error GoTo fff

If Dir(App.Path & "\save.ini") <> "" Then

Open App.Path & "\save.ini" For Input As #1

Do Until (1)

Input #1, str

If str <> "" Then

List1.AddItem str

End If

Loop

Close #1

End If

fff:

Close #1

Close #3

For I = 1 To 60

Combo1.AddItem I

Next

End Sub

Private Sub form_unload(cancel As Integer)

If Check2.Value = 1 Then

Open App.Path & "\save.ini" For Output As #2

For aa = 0 To List1.ListCount

Print #2, List1.List(aa)

Next

Close #2

End If

End Sub

Private Sub List1_Click()

If Check3.Value = 1 Then

ccc = Mid(List1.List(List1.ListIndex), 1, 1)

Text1.Text = Mid(List1.List(List1.ListIndex), 2, Len(List1.List(List1.ListIndex)))

End If

End Sub

Private Sub Text1_Change()

If List1.ListIndex >= 0 And Check3.Value = 1 Then

List1.List(List1.ListIndex) = ccc & Text1.Text

End If

End Sub

Private Sub Timer1_Timer()

If ti >= List1.ListCount Then

ti = 0

Exit Sub

End If

n = yahoo.Me.Status.SetCustomStatus(Mid(List1.List(ti), 2, Len(List1.List(ti)) - 1), Mid(List1.List(ti), 1, 1), Null, Null)

ti = ti + 1

End Sub

我是參考

電腦王

鏈接文章
分享到其他網站

請登入後來留意見

在登入之後,您才能留意見



立即登入