Assalam-o-Alikum
To day I am share Mcore .net sms library .This Library is use to Send and Receive sms on Pc .
You need mCoreLib.dll file which Can Be Download here remember it free vision or Demo file .
You need the reference of mCore.lib file to your Program .For this right click on Solution Explorer and select Add reference now go to Browser Tab and add mCore.dll From Your Specified Location .
In this application I create One classes and make method of ,send sms and connect mobile in this class and call these method on the specified Button like For Send sms I call send sms method Behind it .
Now the Class Code is there
To day I am share Mcore .net sms library .This Library is use to Send and Receive sms on Pc .
You need mCoreLib.dll file which Can Be Download here remember it free vision or Demo file .
You need the reference of mCore.lib file to your Program .For this right click on Solution Explorer and select Add reference now go to Browser Tab and add mCore.dll From Your Specified Location .
In this application I create One classes and make method of ,send sms and connect mobile in this class and call these method on the specified Button like For Send sms I call send sms method Behind it .
Now the Class Code is there
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace newsmscore
{
class myclass
{
public string output;
public mCore.SMS objSMS = new mCore.SMS();
public void SendMessage(string nos, string msgs)
{
string strMsg = "This is a very long text message and";
strMsg = strMsg + " it has more than one hundred sixty";
strMsg = strMsg + " characters in it. This is to test how";
strMsg = strMsg + " the long message will be sent using";
strMsg = strMsg + " mCore .NET SMS Library.";
try
{
SetCommParameters();
objSMS.Encoding = mCore.Encoding.GSM_Default_7Bit;
objSMS.LongMessage = mCore.LongMessage.Concatenate;
try
{
objSMS.SendSMS(nos,msgs);
output = "Message Sent Sucessfully";
//MessageBox.Show("Message Sent!");
}
catch (mCore.SMSSendException e)
{
// MessageBox.Show("Message Failed!" + "\r\n" + e.ToString());
}
}
catch (mCore.GeneralException e)
{
// MessageBox.Show(e.ToString());
}
catch (Exception e)
{
}
}
public void SetCommParameters()
{
try
{
objSMS.Port = "COM7";// the I/o port throgh which your mobile is connected it may be From Com1-Com20 To cheack it go to device manager and see I/O port
objSMS.BaudRate = mCore.BaudRate.BaudRate_19200;
objSMS.DataBits = mCore.DataBits.Eight;
objSMS.StopBits = mCore.StopBits.One;
objSMS.Parity = mCore.Parity.None;
objSMS.FlowControl = mCore.FlowControl.RTS_CTS;
}
catch (mCore.GeneralException e)
{
// MessageBox.Show(e.ToString());
}
catch (Exception e)
{
}
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace newsmscore
{
class myclass
{
public string output;
public mCore.SMS objSMS = new mCore.SMS();
public void SendMessage(string nos, string msgs)
{
string strMsg = "This is a very long text message and";
strMsg = strMsg + " it has more than one hundred sixty";
strMsg = strMsg + " characters in it. This is to test how";
strMsg = strMsg + " the long message will be sent using";
strMsg = strMsg + " mCore .NET SMS Library.";
try
{
SetCommParameters();
objSMS.Encoding = mCore.Encoding.GSM_Default_7Bit;
objSMS.LongMessage = mCore.LongMessage.Concatenate;
try
{
objSMS.SendSMS(nos,msgs);
output = "Message Sent Sucessfully";
//MessageBox.Show("Message Sent!");
}
catch (mCore.SMSSendException e)
{
// MessageBox.Show("Message Failed!" + "\r\n" + e.ToString());
}
}
catch (mCore.GeneralException e)
{
// MessageBox.Show(e.ToString());
}
catch (Exception e)
{
}
}
public void SetCommParameters()
{
try
{
objSMS.Port = "COM7";// the I/o port throgh which your mobile is connected it may be From Com1-Com20 To cheack it go to device manager and see I/O port
objSMS.BaudRate = mCore.BaudRate.BaudRate_19200;
objSMS.DataBits = mCore.DataBits.Eight;
objSMS.StopBits = mCore.StopBits.One;
objSMS.Parity = mCore.Parity.None;
objSMS.FlowControl = mCore.FlowControl.RTS_CTS;
}
catch (mCore.GeneralException e)
{
// MessageBox.Show(e.ToString());
}
catch (Exception e)
{
}
}
}
}
and the Out put is Like
To Download Full Project With Code and Exe file Click Here
any Question Or Query please free To ask in comments .
is it possible to recharge balance using mCore Library
ReplyDeleteYes It is possible But requirement is that for this Purpose You need SMPP SERVER For sms sending and receiving .GMS modame or mobile can not recharge some one account
ReplyDeleteis it possible to send sms to mobile that doesn't connect to PC?
ReplyDelete@Tasneem Mohammad ,Yes It Sms to all mobile having G.s.m Network (SIM).
ReplyDeleteHow to send latin characters like é á ó ã õ ç?
ReplyDelete