A Conversation for The H2G2 Programmers' Corner
Visual basic and shell
Din'Amarth Started conversation Feb 7, 2004
I am trying to write a crappy little messenger program that uses the "net send" command. As it is every time I send a message it opens a new dos window. Is it possible to do any one of the following things (any would be an acceptable sollution): get the program to use the same dos window for every message, make the dos window close out after the message is sent, or make it so that the thing doesn't even open a dos window.
I'm using Visual Basic 6, and right now I'm using the following bit of code to send the messages.
Shell ("net sent " + compBox.Text + " " + MessageBox.Text)
Visual basic and shell
Zak T Duck Posted Feb 7, 2004
Not used VB much but does this help at all?
http://internettrash.com/users/fdb/broadcas.htm
Visual basic and shell
Dark Master - The end is now (2005/03/01) Officially Left Posted Feb 7, 2004
calling Shell ("net sent " + compBox.Text + " " + MessageBox.Text) should open a dos dialog then it should close after the program completes. Maybe on win 98 it doesn't close after, it does on XP so I cant really help.
Visual basic and shell
Dark Master - The end is now (2005/03/01) Officially Left Posted Feb 8, 2004
If the code above works then its probably the best way to do it.
Visual basic and shell
Zak T Duck Posted Feb 8, 2004
Under win98 the net send command doesn't exist, it's only part of NT variant operating systems, and even then only if it's not been disabled.
Visual basic and shell
Dark Master - The end is now (2005/03/01) Officially Left Posted Feb 8, 2004
so what are you using then?
Visual basic and shell
Zak T Duck Posted Feb 8, 2004
I use XP Pro, but have had experience with Windows since 3.1. Since It's safe to assume that Din'Amarth is using an NT based windows, (NT, 2000, XP and above) since those are the only windows OS that have the net send messenger service.
Visual basic and shell
Dark Master - The end is now (2005/03/01) Officially Left Posted Feb 8, 2004
I guessed that much, but i was hoping that when he comes back he might tell us, if he is using xp (home or pro) then it should end the dos window for him, but i dont know about 2000 or NT
Visual basic and shell
Din'Amarth Posted Feb 8, 2004
Well, I'm programming the thing on 98, but I'm programming it for a computer with XP.
If XP does indeed close the dos windows then I will just go with what I've got.
I'll try to get the thing tested on XP Tomorrow. If it works, then yay! If not, then I will just have to cry.
~~Din'
Visual basic and shell
Dark Master - The end is now (2005/03/01) Officially Left Posted Feb 8, 2004
If your programming it on 98 then how do you even have the net send command, croz is right, my 98 machine doesn't have net send
Visual basic and shell
Din'Amarth Posted Feb 8, 2004
No, I don't have net send, but I can tell by the error message that it pops out in the dos window that it would work if I did.
~~Din'
Visual basic and shell
DoctorMO (Keeper of the Computer, Guru, Community Artist) Posted Feb 8, 2004
I'd have a look further, I remeber doing some pkzip program and I did manage to get no dos windows to apear at all.
not only that but for compatability I'd use ComIO ActiveX control and do a client service, just because I consider Netsend to be the work of the devil
-- DoctorMO --
Visual basic and shell
Din'Amarth Posted Feb 8, 2004
I might try something like that later, but for now net send suits my purposes fine. Right now I'm just trying to make a GUIed version a 13 line program I write in QBASIC.
Net send is quick and easy to use, and I don't really need anything more powerful than it.
Also, I have limited programing experiance, and don't really have time to learn how to do ComIO ActiveX control right now. But if you could give me a good web site to read up on that stuff I will look into it.
~~Din'
Key: Complain about this post
Visual basic and shell
- 1: Din'Amarth (Feb 7, 2004)
- 2: Zak T Duck (Feb 7, 2004)
- 3: Dark Master - The end is now (2005/03/01) Officially Left (Feb 7, 2004)
- 4: Dark Master - The end is now (2005/03/01) Officially Left (Feb 8, 2004)
- 5: Zak T Duck (Feb 8, 2004)
- 6: Dark Master - The end is now (2005/03/01) Officially Left (Feb 8, 2004)
- 7: Zak T Duck (Feb 8, 2004)
- 8: Dark Master - The end is now (2005/03/01) Officially Left (Feb 8, 2004)
- 9: Din'Amarth (Feb 8, 2004)
- 10: Dark Master - The end is now (2005/03/01) Officially Left (Feb 8, 2004)
- 11: Din'Amarth (Feb 8, 2004)
- 12: DoctorMO (Keeper of the Computer, Guru, Community Artist) (Feb 8, 2004)
- 13: Din'Amarth (Feb 8, 2004)
- 14: DoctorMO (Keeper of the Computer, Guru, Community Artist) (Feb 9, 2004)
More Conversations for The H2G2 Programmers' Corner
Write an Entry
"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."