pop up message

hbaggs

Registered User.
Local time
Today, 09:05
Joined
Feb 5, 2004
Messages
39
I am wanting to create a small program which enables three users on a XP network peer to peer which enables each user to send a pop up message (i.e. You have a message waiting). This would be used to alert a user they have a message waiting and or just to send a simple message to the other. I guess I would ideally like to see code that does this which is pretty simple!!! I have looked for a sample in the samlpes but cannot see anything. thanx
 
I suggest you used the Net Send command, you need to be able to call this command from Access and you will need to know the users computer name...

Code:
C:\WINDOWS\system32\net.exe send CompterNameHere Hello!
Here is how I do it within Access...

Code:
SendMessage = "cmd /c net send " & CompterNameHere & " " & UserName & " states: " & txtBriefMessage
Call Shell(SendMessage, vbNormalNoFocus)

You can use the Environ function to grab the users computer name...
Code:
MsgBox "Computer Name = " & Environ("ComputerName")
HTH
 
Cool Stuff :D
 
Thankyou for such a quick response.
Basically where does this code go? Is this three different ways of doing the same thing or all of it needed.? I would be grateful for a little more basic instructions....thanx
 
Try This attachment...

Dave

Edit.. Attachment now hides Application Window to make this look like a stand alone popup message service. Just hold down the shift key to access the code to change the computer name from "lounge" to the computer you are trying to contact. It also now hides the command window. :D

Dave
 

Attachments

Last edited:
On second thoughts, seeing your from Adelaide, I am thinking about removing that attachment ;) :p

Look in the code and change the name "Lounge" to the name of the computer you are sending the msg too.

Dave
 
Dave,

How about an Access 97 version? :D
 
Would you like fries with that ? :p

PS: I commented out the Hide Application line and then realised I couldn't change it back after I converted it !

You can add other computer names to this list as you wish.

Dave
 

Attachments

Oldsoftboss said:
Would you like fries with that ?
Yes, and a large Mountain Dew please! :D

Nice job Dave. I have never used the hide app code in a production db before because I can never figure out how to display the applicaition on the Windows start bar [but I do not think it is possible]. I like the look of hiding the application but it gives the false impression that it is not there if you do not see it on the start menu bar as an option to select without having to use Alt + Tab to cycle between the open programs.
 
Oldsoftboss said:
There is a sample Db here: http://www.access-programmers.co.uk/forums/showthread.php?t=66282
but it crashes A2000.

See if you can adapt it to the app.

Dave
I had seen that sample before. It only minimizes the Access application to the users system tray. Once it is minimized you can only bring it back by clicking the apps icon from within the system tray. It does not give the stand-alone "program" look like the code you are using to hide the Access application window. I like that look, I just do not like that fact that you can not see the program on the Start menu bar as on opened program. You have to Alt-Tab to find it if you have switced to another opened program.
 
Old Soft Boss G'day..I have a lot of sympathy for Victorians!
Thankyou for the attachment.
How would I be able to view this code? After extracting and double clicking it -it opens and for love nor money I can't get into the properties to see events etc.
I am hoping I can just paste this code into my application. ( I am wanting to leave messages for various ppl that they have a message waiting in our application I have written for a Telephone Messages purpose...it seem that we all forget to check our messages even though they have been added and available for reading)..
thanx for your help
 
hbaggs said:
Old Soft Boss G'day..I have a lot of sympathy for Victorians!

How would I be able to view this code?

Send Money..... Lots of money :p
 
Sorry, Victorian sarcasm coming out there :)

Hold down the shift key when you open the Db, then delete the line (and module I suppose) in the Open Event of the Message form.



This example now has a table of users and their computer names to choose from. This one should open normally.

You shpuld be able to import them directly into your App (But BACK IT UP first)

Dave
 

Attachments

Old Boss?

OK- I'm not too cocky at the moment...my team is nearly bottom!!!
Thank you for the next version of this little pop up program.
I have a small application which we use to record our telephone Messages. Sort of like the old written message book. Trouble now is that we forget to open up the program and check our messages. So I was looking for a means of each of us being able to pop up a message on each others computer that can say...don't forget, or you have messages, or cya tomorrow, or ya sacked!
So I have taken your little program and I have opened my program and imported all the forms, queries and even the module. I have then opened your computer table and typed in the names of the three computers we have i.e. reception, lisa and harold. I have not used \\ or the full paths as I thought that somehow mysteriously Xp would somehow look on the network to find the computer with the name and send the message there!
But alas I was wrong.
What could that be...I have TCP/IP installed (only protocol I think).
What (among the many) fundamentals am I missing?
thanx
Harold
 
Last edited:

Users who are viewing this thread

Back
Top Bottom