Pastebin is 300% more awesome when you are logged in. Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jul 20th, 2012  |  syntax: VB.NET  |  size: 1.47 KB  |  hits: 44  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
  2.         Dim keyword As String = ""
  3.         Dim arrKeyword() As String
  4.         Dim param As String = ""
  5.         Timer1.Enabled = False
  6.  
  7.         ymVersion = getYMVersion()
  8.         Select Case ymVersion
  9.             Case "8"
  10.  
  11.                 hwndYMMainClass = FindWindow("YSearchMenuWndClass", vbNullString)
  12.  
  13.             Case "9"
  14.                 hwndYMMainClass = FindWindow("ATL:007C07F0", vbNullString)
  15.  
  16.             Case "10"
  17.                 hwndYMMainClass = FindWindow("CConvWndBase", vbNullString)
  18.  
  19.         End Select
  20.         If hwndYMMainClass <> 0 Then
  21.  
  22.             pause(1)
  23.  
  24.             ymid = getYMID(hwndYMMainClass)
  25.             msg = getYMMessage(hwndYMMainClass)
  26.             lstBox.Items.Add(ymid + "-" + msg)
  27.  
  28.             'Label1.Text = msg
  29.  
  30.             If Len(msg) > 0 Then
  31.                 If InStr(1, msg, " ", CompareMethod.Text) > 0 Then
  32.                     arrKeyword = Split(msg, " ")
  33.                     keyword = arrKeyword(0)
  34.  
  35.                 Else
  36.                     keyword = msg
  37.                     ReDim arrKeyword(0)
  38.                 End If
  39.             Else
  40.                 keyword = ""
  41.                 ReDim arrKeyword(0)
  42.             End If
  43.  
  44.             ymChatSend(hwndYMMainClass, "Telah terima")
  45.             closeYM(hwndYMMainClass)
  46.             Timer1.Enabled = True
  47.             'MsgBox(keyword)
  48.         End If
  49.     End Sub