Is it possible to send the items in the listbox through winsock to another form?
Printable View
Is it possible to send the items in the listbox through winsock to another form?
If you mean another form on another computer then yes. If you mean another form in your application then no. You would just have to do the painful method of using a loop to load the list contents. If however you mean another form on another program, well, I imagine yes but I would hate to do that API.
If you could be more specific, I am happy to help you.
Setup a basic client to client application (meaning winsocks on each form)
write the code required for the client to listen on a port, accept a connection, connect and disconnect
from there use a basic for loop and a delimiter such as the # symbol to seperate the data in the listbox
if all you plan on sending is the listbox data there's no need to use a protocol structure...if you do plan on adding on other features to your mini network application. Use a basic alpha numeric single character protocol structure to determine the features/function/routines to fire
have fun, be cool and good luck.