is what I have Im basicly making a program to ignore a list of names within a list box and then display the names that I have ignored within list2.Code:Private Sub Command1_Click() Dim imclass As Long Dim yiminputwindow As Long Dim x As Long, editx As Long Dim Button As Long On Error Resume Next imclass = FindWindow("imclass", vbNullString) PostMessage imclass, WM_COMMAND, 33134, 0 DoEvents x = FindWindow("#32770", vbNullString) editx = FindWindowEx(x, 0&, "Edit", vbNullString) DoEvents x = FindWindow("#32770", vbNullString) Button = FindWindowEx(x, 0&, "button", "&Ignore User...") Call SendMessageLong(Button, WM_KEYDOWN, VK_SPACE, 0&) Call SendMessageLong(Button, WM_KEYUP, VK_SPACE, 0&) Do DoEvents imclass = FindWindow("imclass", vbNullString) yiminputwindow = FindWindowEx(imclass, 0&, "yiminputwindow", vbNullString) Call SendMessageByString(yiminputwindow, WM_SETTEXT, 0&, List2.Text & " have been Ignored.") Call SendMessageLong(yiminputwindow, WM_KEYDOWN, 13, 0&) Loop Until yiminputwindow <> 0 End Sub Private Sub Command2_Click() cd1.FileName = "" cd1.Filter = "Namelist (*.txt)|*.txt" cd1.ShowSave If cd1.FileName <> "" Then Savenublist cd1.FileName, List1 End If End Sub Private Sub Command3_Click() Loadtxt cd1, List1 End Sub Private Sub Command4_Click() Text1.Text = List1.Text End Sub Function Loadtxt(dialogCommon As CommonDialog, list45 As ListBox) With dialogCommon .DialogTitle = "Load Your Yahoo! Lamer List" .Filter = "Lamers Namelist (*.txt)|*.txt" .ShowOpen Close #1 Open .FileName For Input As #1 While Not EOF(1) Line Input #1, allstring List1.AddItem allstring Wend Close #1 End With End Function Function Savenublist(thefilename As String, thelist As ListBox) Open thefilename For Output As #1 For i = 0 To List1.ListCount - 1 Print #1, List1.List(i) Next i Close #1 End Function Private Sub Form_Load() End Sub Private Sub List1_Click() List1.Text = List2.Text End Sub
The point of this program is for yahoo and this is my work around for syslistview heh, it basicly uses a list of names you can load and then save and use again later.
Feel free if there is anything I should currect to this to that might be a problem.![]()




Reply With Quote