April 30, 2012 at 5:26 pm #186955Friend4LifeMember
Please help if you can i know you can HELP 😀 i did swear check program in vb6 i successed searching what ever anyone type with listbox-content-word then if it finds the word it will sent warning msg with the user nickname who wrote, what i want to do forther is to search the user nickname and reddot not just warning 😀 how can i add that function? PLEASE HELP ME here is what i came upto so far:
Call GetLastLine For n = 0 To ListAddWord1.ListCount - 1 If InStr(RichTextBox2.Text, ListAddWord1.List(n)) Then ListAddWord1.Selected(n) = True x = InStr(1, RichTextBox2.Text, ListAddWord1.Text) xx = Mid$(RichTextBox2.Text, 1, x - 1) xx = Replace(xx, ":", "") xx = LTrim(xx) Text2 = xx ' xx = The nickname who wrote the word txtwarning = "Please " & Text2 & " do not use that word!" 'example warning msg! Call RoomSend(txtwarning.TextRTF) Text2 = "" End If Next
Thank you for ur timeMay 1, 2012 at 9:16 am #186962
I think there is an example of red dotting in Loco’s Admin Bot project but Im not sure and its way to early for me to be bothered to look.
Or, you could do something like:
Get the list of nics in the room from the room list.
Save that list to an array. (note, that the first item is 0(zero).
Since the code you provided above already gets the name of the offending person, find that name in your array.
Its position in the array will be its index.
Once you know its index, you can then send a message to the rooms listview and choose the nic using LVM_SETITEMSTATE.
Then, use the same method you used to open the window in your “Room Stats” project to choose the Red Dot menu item.
There is an example somewhere on the forum on how to get the rooms list of nics. Search for it and research the LVM_SETITEMSTATE and you can probably figure out the rest.May 2, 2012 at 2:00 pm #186961Friend4LifeMember
Hi string Thank you very much, i will try ur advise and will comeback THANK YOU uncountable timesMay 12, 2012 at 6:38 pm #186960light 2012Member
What’s wrong in new version ?
Is the problem in this code?
Private Const LVM_SETITEMSTATE = (LVM_FIRST + 43)May 17, 2012 at 11:48 am #186959
I don’t understand your question, light2012. There is no problem with using LVM_SETITEMSTATE. However, Private Const LVM_SETITEMSTATE = (LVM_FIRST + 43) would mean to select the 44th user. If the room did not have 44 users, the code would fail.May 18, 2012 at 7:26 pm #186958ChikeMember
That’s just the definition of LVM_SETITEMSTATE as it is in windows headers.
#define LVM_SETITEMSTATE (LVM_FIRST + 43)
of course you need LVM_FIRST defined for that
#define LVM_FIRST 0x1000 // ListView messages Const LVM_FIRST = &H1000 Const LVM_SETITEMSTATE = (LVM_FIRST + 43)
Const LVM_SETITEMSTATE = &H102BMay 18, 2012 at 10:07 pm #186957light 2012Member
The Problem solved
thank youMay 19, 2012 at 1:47 am #186956
Good eye Chike. I’m not sure what I was seeing there.
- You must be logged in to reply to this topic.