Thanks in advance
.net
i want to send message to other pc via lan. after sending message i want a acknowledgment message from the receive side can any one help me
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Lalit MRank #1,186 · 1.5K reputationPosted Mar 24, 2010, 11:18 PM EDT
if (lstnames.SelectedItems.Count > 0) {
foreach (string strSeleted in lstnames.SelectedItems) {
//somehow a list item is in fact a string
string strname = " " + strSeleted;
long lngPos = 1;
do {
long lretval = Shell("net send " + strname + " \"" + Mid(strMessage, lngPos, iChunk) + "\"", vbHide);
lngPos += iChunk;
//pause to stop out of sequence message chunks
Sleep(100);
}
while (!(lngPos > Len(strMessage)));
strStatus += strname.ToString;
}
}
show here article in vb.net
Amit ChoudharyRank #145 · 15.8K reputationPosted Mar 24, 2010, 11:54 PM EDT
you can use MSMQ and feature provided in Windows OS's. some times its not installed. you have install it from your control panel add/remove windows component and select the check box for MSMQ(Microsoft Messaging Queue). and install it you need your OS setup CD sometimes.
In .net there is library to provide you support to access the MSMQ:
Follow below articles to learn about using MSMQ libraries of .net and how to send reliable messages:
1. http://msdn.microsoft.com/en-us/library/ms978430.aspx
2. http://www.c-sharpcorner.com/UploadFile/[email protected]/MSMQ11292005035019AM/MSMQ.aspx
Please mark as answer if it helps you.
Sam HobbsRank #107 · 20.5K reputationPosted Mar 25, 2010, 8:08 AM EDT