LITTLEBLACKDOG.COM Forum Index LITTLEBLACKDOG.COM

 
LWD LWD   FAQ FAQ   Memberlist Memberlist   Usergroups Usergroups   Active Topics Active Topics   Register Register  
  Profile Profile   Log in to check your private messages Log in to check your private messages   Log in Log in  
  Who is Online Who is Online   Image Gallery Image Gallery   Chat Chat   Search Search  
  LWDGear       LBDGear  

View next topic
View previous topic
Post new topic     Reply to topic   LITTLEBLACKDOG.COM Forum Index » Code Warriors
Author Message
Daftlad
Stray Dog


Joined: 14 Oct 2003
Posts: 7
Location: England

Post Posted: Thu Oct 16, 2003 5:24 am   Post subject: Visual Basic 6 question (Using a Dos command) Reply with quote Back to top  

How would I go about calling the net send command within VB, could someone post an example as to how it is done Very Happy

thanks buddy's ! Wink

lots of love ME lol

_________________
"Its not the size of the wand, its the magic in the stick.."
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Webster
Guide Dog
Guide Dog


Joined: 16 Feb 2002
Age: 28
Posts: 8701
Location: Vacationland

Post Posted: Thu Oct 16, 2003 5:28 am   Post subject: Reply with quote Back to top  

You could use the shell command.

_________________
www .Run To Win.com
The Marathon Thread
I finally published my book: Comprehensive Guide to Marathon Preparation & Recovery
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Daftlad
Stray Dog


Joined: 14 Oct 2003
Posts: 7
Location: England

Post Posted: Thu Oct 16, 2003 5:29 am   Post subject: Reply with quote Back to top  

and me being a complete newbie to VB could you enlighten me to the use of this command. and is there any other methods that I may look into ?

_________________
"Its not the size of the wand, its the magic in the stick.."
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
mellowgreengiant
Toilet Drinker
Toilet Drinker


Joined: 06 Jun 2003
Posts: 330
Location: here

Post Posted: Thu Oct 16, 2003 6:06 am   Post subject: Reply with quote Back to top  

Code: Select all
Dim retVal as Long

retVal = Shell("C:\MyFolder\MyProg.exe")


I would have put the path to the 'net send' command in there, but I'm not familiar with it. It's an executable right?

The shell command will run the executable in a command window... it think minimized by default, but you can change that with a second optional argument to the function. I think the return value is the handle for the new command window.

The executable will lauch and continue on in your code. So it is not going to wait until it finishes executing before the rest of your procedure is executed.

_________________
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Lycander
Lead Dog
Lead Dog


Joined: 24 May 2002
Age: 25
Posts: 12198
Location: The Constitution State

Post Posted: Thu Oct 16, 2003 6:10 am   Post subject: Reply with quote Back to top  

Try this:

http://msdn.microsoft.com/library/en-us/vbenlr98/html/vafctShell.asp?frame=false

The return value is the "task ID" according to the doc, so I think that means the Process ID (a term we're more familiar with). You'll have to hold onto that ID number to get info on the process afterwards, or to programmatically kill it.

_________________
To the top of hunger mountain
I found my solitary ways
Where I could live on nuts and honey
And take my shelter in a cave
View user's profile Send private message
T
Curmudgeon


Joined: 17 May 2001
Posts: 16184
Location: Airstrip One

Post Posted: Thu Oct 16, 2003 6:26 am   Post subject: Reply with quote Back to top  

Why call an external process? Why not just interact with the Alerter or Messenger service directly from your program?

_________________
Got questions? Click here.
Still got questions? Click here, too.

affabletoaster, Akely, anglachel, blahpony, CMTG, EdisonRex, Elk, Equin, evilness, Fido, fathertyme, Goddess, Jaymac, je, jodygirl, KingKobra, Lycander, mally, Max, OhioArt2, perrito_blanco, Rover, Spot, sully_51, Superdwarf, the taz man, thriftyjack, twiztid, wrathiron, yiayia49

Would you like
good music at a price that is right? CD Baby, baby.

You look like you need a monkey.
View user's profile Send private message
Daftlad
Stray Dog


Joined: 14 Oct 2003
Posts: 7
Location: England

Post Posted: Thu Oct 16, 2003 9:32 am   Post subject: Reply with quote Back to top  

Demon wrote:
Why call an external process? Why not just interact with the Alerter or Messenger service directly from your program?


This is a great idea BUT ! ha how lol ! haha


Take a break have a look at http://www.misternicehands.com

_________________
"Its not the size of the wand, its the magic in the stick.."
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic     Reply to topic

View next topic
View previous topic
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


Powered by phpBB © 2001, 2002 phpBB Group
phpBB SEO
All times are GMT - 8 Hours

Help us keep advertisements off this site. Donate today!