select nic in pal nic list

You can talk about VB programming here

select nic in pal nic list

Postby autopilot » Sun Aug 12, 2007 3:00 pm


I am struggling to figure out how to select the nic i want in the nic list. I can step through the list and find it, but once I know which nick it is, how do I go about selecting it?

autopilot

Edit: in the past, the way I have done it was in an automatic bouncer and so i just sent the nic to the syslistview and then checked to see if that was the nic highlighted and if they matched, then bounce. well that works great unless the nic you want to highlight is an @.

I am working on a file bot program and so I need to be able to higlight @ nic's to send them files when they request it.

Edit2: Stepping through each nic untill i find the one i want is not as fast as i would like. Anyone know a better way? maybe a way to use LVM_FINDITEMW... just a thought without the knowledge of how to implement it :(
Last edited by autopilot on Sun Aug 12, 2007 3:19 pm, edited 2 times in total.
User avatar
autopilot
Forum Moderator
Forum Moderator
 
Posts: 358
Joined: Sat Sep 23, 2006 7:19 pm

Postby autopilot » Thu Aug 16, 2007 8:33 am

Anyone have any solution for me on do this?
User avatar
autopilot
Forum Moderator
Forum Moderator
 
Posts: 358
Joined: Sat Sep 23, 2006 7:19 pm

Postby Departure » Thu Aug 16, 2007 2:36 pm

I'll look in to it when i get home autopilot, I have done it before but i can'nt remeber and I dont have VB installed on my laptop ......
User avatar
Departure
Global Moderator
Global Moderator
 
Posts: 996
Joined: Thu Mar 17, 2005 11:26 am
Location: Australia

select nic in pal nic list

Postby autopilot » Thu Aug 16, 2007 3:00 pm

I found a solution on another site. It was for vb6, but i was able to run it through the vb 2005 upgrade utility and then hand fix anything that did not upgrade correctly.

Thanks

autopilot
User avatar
autopilot
Forum Moderator
Forum Moderator
 
Posts: 358
Joined: Sat Sep 23, 2006 7:19 pm

Re: select nic in pal nic list

Postby method » Wed Oct 10, 2007 7:41 am

could you share the code for vb6 ?Thanks
method
imFiles Master
imFiles Master
 
Posts: 686
Joined: Tue Oct 18, 2005 11:12 am

Re: select nic in pal nic list

Postby autopilot » Wed Oct 10, 2007 1:11 pm

the attached project is not Pal spacific... it is what I found that helped me figure it out in VB 2005.
Attachments
VB6HighLightSysLV.zip
VB6 project to highlight syslistview item.
(3.82 KiB) Downloaded 218 times
User avatar
autopilot
Forum Moderator
Forum Moderator
 
Posts: 358
Joined: Sat Sep 23, 2006 7:19 pm

Re: select nic in pal nic list

Postby Chike » Mon Nov 05, 2007 2:32 pm

Thanks

It was a bit** to port to c++ though :D

all because of:
Code: Select all
LVITEM.state = True

it should be:
Code: Select all
LVITEM.state = LVIS_SELECTED


This is because in basic True is probably -1, which set all bits to 1, while in c it''s logicaly anything that is not zero, and the TRUE macro is defined as 1 which only set the 1st bit.
Image
Chike
imFiles Master
imFiles Master
 
Posts: 583
Joined: Sun May 13, 2007 6:20 pm

Re: select nic in pal nic list

Postby method » Mon Nov 12, 2007 12:17 pm

Thanks autopilot . could you help me make your attached code work for paltalk 9.2 ? I had used similer code for paltalk 8.2 but now i can't modify it to work with 9.2. So i be happy if you help me make this code work for 9.2.
method
imFiles Master
imFiles Master
 
Posts: 686
Joined: Tue Oct 18, 2005 11:12 am

Re: select nic in pal nic list

Postby steven » Wed Feb 13, 2008 6:29 am

hi guys .. no solution to select the nicknam !! :cry:
steven
imFiles Newbie
imFiles Newbie
 
Posts: 14
Joined: Thu Feb 07, 2008 11:55 am

Re: select nic in pal nic list

Postby Chike » Wed Feb 13, 2008 10:12 am

steven wrote:hi guys .. no solution to select the nicknam !! :cry:

Of course there is.

Once you can focus on the problem, keep your questions in the topic you started instead of spreading all over the forum, explain what you are trying to do and where the problem is, in details and clear language, and provide the code that does not work, you may be helped.
Otherwise you're just waisting your time and other's.
Image
Chike
imFiles Master
imFiles Master
 
Posts: 583
Joined: Sun May 13, 2007 6:20 pm

Re: select nic in pal nic list

Postby steven » Wed Feb 13, 2008 5:47 pm

hello Chike .. am sorry if my language is not clear . but i realy need your help . actualy i post my problem before i view all the topics in the forum am sorry about this , and am new in this forum , and i found it helpfull .
my problem is that i downloaded the fast bouncer source code , posted by locohacker i think , and i tried to use it with paltalkscene but when i select the nickname from the form listbox1 and double click it , then it bounce the wrong nicknam that selected from the paltalk room unfortunately , actualy am not good in vb like you , but when i traced the code i observed that the nicknames wonn't be listed in list3 to match the bounced nicknam from list1 .

i will be appreciated for help.. thank you and am sorry again
steven
imFiles Newbie
imFiles Newbie
 
Posts: 14
Joined: Thu Feb 07, 2008 11:55 am

Re: select nic in pal nic list

Postby Chike » Wed Feb 13, 2008 7:30 pm

Was list3 empry? If that's the case see that the syslistview in NickGet is found properly.
I don't completely understand this code (bounce,bounce2) but it seems there no check to see if the name was found before the bounce, so you may want to fix that. Also the loop continue even after the name is found, so you may also want to exit the loop when the name is found.
I myself would have merged NickGet (and GetListviewItem) with MessageCrossProcess, send the nic to be bounced as a parameter, and check the name there, select it and bounce instead of building list3 and then iterating it again to find the name.
Image
Chike
imFiles Master
imFiles Master
 
Posts: 583
Joined: Sun May 13, 2007 6:20 pm

Re: select nic in pal nic list

Postby steven » Wed Feb 13, 2008 7:48 pm

thanks alot .. yah the case is that list3 is empty while NickGet called.. is that means the function not working properly ? i hope that you have an easir code so that be able to understand how the nic is bounced exactly using list ?

thank you again and again
steven
imFiles Newbie
imFiles Newbie
 
Posts: 14
Joined: Thu Feb 07, 2008 11:55 am

Re: select nic in pal nic list

Postby Chike » Wed Feb 13, 2008 8:02 pm

<sigh> yes list3 can be empry when NickGet is called it sould be filled on it's return.
Step through NickGet and see that syslistview is not zero when calling GetListviewItem.

GetListviewItem is getting the names from the room and put them in list3 (in the same order as in the room), then list3 is searched for the selected nick (bounce,bounce2), then MessageCrossProcess is called to select it, then posting the bounce command to the room and lounching bc.exe to put the reason and ok the bounce dialog window. Clear now?
Image
Chike
imFiles Master
imFiles Master
 
Posts: 583
Joined: Sun May 13, 2007 6:20 pm

Re: select nic in pal nic list

Postby steven » Wed Feb 13, 2008 8:45 pm

yah Chike .. syslistview return zero :(

i dont know where can i make the changes .. is it in the NickGet function or GetListviewItem
steven
imFiles Newbie
imFiles Newbie
 
Posts: 14
Joined: Thu Feb 07, 2008 11:55 am

Next

Return to Visual Basic Programming

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests