Computer SMS DIY

Source: Internet
Author: User
Tags net send

SMS has become a popular fashion today, but how to experience SMS between the convenience and fast? In fact, we use the Messenger service provided by Windows 2000 can make a message to send a program, so that the author is most proud of it can almost across a variety of network firewalls, unrestricted.

The Messenger service refers to "Send Console Message" in Computer Management. Computer Management merges multiple Windows 2000 Administration tools into a single console tree, making it easy for users to access the management properties and tools of specific computers, and implements a unified desktop tool for managing local or remote computers.

Right-click on my Computer and choose Manage, which displays the Computer Management main interface. Select operations, All Tasks, send console messages ... to open the Send Console Messages window. "".

The interface you see is very concise and the operation is simple. In the edit box above, enter the information you want to send, add/Remove recipients in the edit box below (the initial state shows the computer name of the machine), and then click Send. But in the actual use, I feel the operation of the steps are really cumbersome, so, slightly modified a bit. The specific implementation process is as follows:

1. Run C + + Builder 5.0, and then through the menu file| New application to create a project.

2. Add an edit component, a memo component, multiple label, and button components to the form. The edit box is used to enter the recipient's computer name or IP address, memo is used to enter information to send, the message can be multiple lines of text, and multiple buttons are used to trigger different actions.

3. The core program is the "Send" button of the OnClick event processing process:

void __fastcall TForm1BtnSendClickTObject Sender
AnsiString str
str=″NET SEND″
str=str+″ ″
str=str+Edit->Text 第6行
str=str+″ ″
str=str+Memo->Text
WinExecstr.c_str SW_HIDE

The above only completes the basic function which sends the text message, but also can carry on the function expansion. For example, to change the 6th line of the program to "Str=str+″″" or "Str=str+″/domaindomainname″", you can send messages to all computers in a workgroup or domain, and if you want to send messages to all users participating in a server session, The statement is "Str=str+″/users″".

Description: First, you must run the Messenger service to receive messages. In other words, to run on Windows 2000, Windows 98 does not support Messenger services. Second, this program does not have the ability to receive messages. Because Windows 2000 automatically starts the Messenger service, receives messages, and pops up a dialog box to display the information.

Note: This program is debugged in Windows & C + + Builder 5.0 Environment

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.