Hi!
I wrote these and works very well. I do write it just to send SMS. I was able to send at once only to one cellnumber. Its works.
try
{
WebClient client = new WebClient();
string to, msg;
to = lblNumberFlashMessage.Text;
msg = txtReceiveFlashMessage.Text;
string baseurl = "http://api.clickatell.com/http/sendmsg?user=xxx&password=xxx&api_id=xxx&to='" + to + "'&text='" + msg + "'";
client.OpenRead(baseurl);
MessageBox.Show("Message sent");
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
Then when I use these codes that allow me to pass one by one throught a label.
Curiously, after to click on the button, its send the SMS by its send only the last number.
Other codes:
Control p;
p = ((Button)sender).Parent;
p.SelectNextControl(ActiveControl, true, true, true, true);
int i = 1;
if (cbxReadNomFlashMessage.SelectedIndex < cbxReadNomFlashMessage.Items.Count - 1)
{
cbxReadNomFlashMessage.SelectedIndex = cbxReadNomFlashMessage.SelectedIndex + i;
Application.DoEvents();
i++;
int milliseconds = 2000;
Thread.Sleep(milliseconds);
-----------------------------------------------THEN THE WHOLE IS:
private void btnSentFlashMessage_Click(object sender, EventArgs e)
{
// This module of code was wrote by PananaControl p;
p = ((Button)sender).Parent;
p.SelectNextControl(ActiveControl, true, true, true, true);
int i = 1;
if (cbxReadNomFlashMessage.SelectedIndex < cbxReadNomFlashMessage.Items.Count - 1)
{
cbxReadNomFlashMessage.SelectedIndex = cbxReadNomFlashMessage.SelectedIndex + i;
Application.DoEvents();
i++;
int milliseconds = 2000;
Thread.Sleep(milliseconds);
//These code by me
try
{
WebClient client = new WebClient();
string to, msg;
to = lblNumberFlashMessage.Text;
msg = txtReceiveFlashMessage.Text;
string baseurl = "http://api.clickatell.com/http/sendmsg?user=xxx&password=xxx&api_id=xxx&to='" + to + "'&text='" + msg + "'";
client.OpenRead(baseurl);
MessageBox.Show("Message sent");
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
IsraelPosted Apr 25, 2017, 5:20 PM
Nilesh ShahPosted Apr 25, 2017, 3:10 PM
IsraelPosted Apr 25, 2017, 2:22 PM
IsraelPosted Apr 23, 2017, 11:35 AM
IsraelPosted Apr 22, 2017, 3:12 PM
IsraelPosted Apr 20, 2017, 8:04 AM
Nilesh ShahPosted Apr 19, 2017, 6:40 PM