forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


List sharing

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Fri May 09, 2008 7:36 pm    Post subject: List sharing Reply with quote

Is there a way that 2 VDS apps can share a list? Kinda like Memorymap with variables except with a list.

I want any changes made to a list with one app to be reflected in another app and vice/versa seemingly in realtime.

Can this be done in VDS?

Thanks in advance.
Back to top
View user's profile Send private message Send e-mail
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Fri May 09, 2008 8:04 pm    Post subject: Reply with quote

Just thought I would clarify.

One app will do nothing but add to the list.

The other app will process the contents of the list and then delete the items as they are processed.

This is the general concept anyway.
Back to top
View user's profile Send private message Send e-mail
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Fri May 09, 2008 9:18 pm    Post subject: Reply with quote

Well apparently "Window Settext" doesn't work on lists Crying or Very sad
Back to top
View user's profile Send private message Send e-mail
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1566

PostPosted: Sat May 10, 2008 4:19 pm    Post subject: Reply with quote

You'll have to save the list to a file and load the file in each list box. I don't think sending them with windows messages/api is going to be as efficient since you have to send each item one by one.
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Mon May 12, 2008 2:26 pm    Post subject: Reply with quote

Actually PGWARE it may be faster to send the Messages since there will be no hard drive IO involved. It really depends on how big the list is. BTW don't use the VDS @sendmsg() function for this. I would use the PostMessage API instead since your second program is in it's on thread. This issue will be sending messages with pointers across process boundaries. If you wanted to give it a try it would be the LB_ADDSTRING = $0180 API Message to add a value to a list box. The LParam needs the address of a string that you want to add to the list box. I don't know if this message works with the VDS bitmap list element Question I would try the @sendmsg() but if that does not work then use the PostMessage API as I suggested above.
_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Mon May 12, 2008 8:06 pm    Post subject: Reply with quote

Thanks for the idea Dragonsphere Very Happy

The list should always remain quit small, maybe 10 items max. I'll look into using the PostMessage API.

I guess I could use a hidden or zero sized listbox on the app that has a dialog and manipulate it from the one that doesn't have a dialog.

Now I need to find an efficient way let the app sending the messages know what the handle for the List element is. I may just use the registry for that part.
Back to top
View user's profile Send private message Send e-mail
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Mon May 12, 2008 8:27 pm    Post subject: Reply with quote

You would know the title text of your application right? Get the handle to the application and then use the @window() VDS function to walk the child windows until you find your list box. Place the list box at the top of your dialog elements so it will be the first list box. That way you would not need to use the registry.
_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Mon May 12, 2008 8:55 pm    Post subject: Reply with quote

It Worked!!!

Have a box of virtual cookies on me Dragonsphere Laughing
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group