473,395 Members | 1,484 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

net send question

I have made a test VB6 app as folows:

Private Sub Command1_Click()
Dim ip As String
Dim msg As String
ip = "Gateway"
msg = "hey how are you"
Shell ("net send" & ip & " " & msg)
End Sub
The problem is when I run this I see a little dos icon flash by but no
message is received.
On the other hand it works fine from the command line?

Any ideas as to how to get this to work?

Thanks
Joe

Nov 20 '05 #1
3 1178
"Joseph Schwartz" <jj***@yahoo.com> schrieb
I have made a test VB6 app as folows:
You should ask in one of the VB6 groups next time because this is a VB.Net
group: microsoft.public.vb.*
Private Sub Command1_Click()
Dim ip As String
Dim msg As String
ip = "Gateway"
msg = "hey how are you"
Shell ("net send" & ip & " " & msg)
End Sub
The problem is when I run this I see a little dos icon flash by but
no message is received.
On the other hand it works fine from the command line?

Any ideas as to how to get this to work?


Have a look at the string you pass to the Shell function. Watch the
blanks...
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2
* "Joseph Schwartz" <jj***@yahoo.com> scripsit:
I have made a test VB6 app as folows:

Private Sub Command1_Click()
Dim ip As String
Dim msg As String
ip = "Gateway"
msg = "hey how are you"
Shell ("net send" & ip & " " & msg)
There is a 'Call' missing in front of the 'Shell'.
On the other hand it works fine from the command line?


This is a VB.NET language group. You may want to post to one of the
microsoft.public.vb.* groups.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #3
You forgot to add a space after the send in the string below\
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:2g************@uni-berlin.de...
* "Joseph Schwartz" <jj***@yahoo.com> scripsit:
I have made a test VB6 app as folows:

Private Sub Command1_Click()
Dim ip As String
Dim msg As String
ip = "Gateway"
msg = "hey how are you"
Shell ("net send" & ip & " " & msg)


There is a 'Call' missing in front of the 'Shell'.
On the other hand it works fine from the command line?


This is a VB.NET language group. You may want to post to one of the
microsoft.public.vb.* groups.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Kurda Yon | last post by:
Sorry for a very stupid question. Can you tell me what does the following html source does if I press button "Send"? If I read this code by Netscaspe from my local file system and then press...
9
by: Etienne Charland | last post by:
Hi, there is an application running on a remote desktop (under Citrix ICA, but the same problem applies for RDC or PC Anywhere). Now, I want to send keys to the remote application from a local app....
13
by: Manfred Braun | last post by:
Hi All, I am trying to understand the blocking method socket.Send(). The call blocks as expected, but does this mean, it returnes after the underlying TCP layer got a confirmation, that the send...
9
by: eswanson | last post by:
I have a web page I need to post a file plus some other fields to it. How can I do this from a asp.net page. I know I can send individual fields to the other page, but how do I send a file to the...
1
by: alexmaster_2004 | last post by:
Hi There i'm using System.Web.Mail to send email message. but i have a problem with it. the emails that i send is in Turkish Language. so when i send the email the receipt can't be able to raed...
3
by: ultr | last post by:
Hello, I have read that send() may not send whole message and returns the nuber of bytes sent, so that we can handle the rest of the message. Is it true, because i have tested sending even 1MB...
2
by: yvan | last post by:
Hi, Here is my client/server scenario: Step1: Client connects to server and sends data sucessfully (using Socket.Send()). Step2: Server gracefully exists (calls Socket.Shutdown() and...
14
by: eliss.carmine | last post by:
I'm using TCP/IP to send a Bitmap object over Sockets. This is my first time using C# at all so I don't know if this is the "right" way to do it. I've already found out several times the way I was...
5
by: canajien | last post by:
I have a form that stores information in a table, but I also need it to send an email when a specific question, among the many, is answered with no the question is a simple drop box: <select...
5
by: Mirxon | last post by:
Hello, I'm working on a C program under Ubuntu. It's basd on socket. Browser calls a client cgi (C program), and send some parameters to server (C program). Server runs another program...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.