Click here to Skip to main content
15,895,876 members
Home / Discussions / C#
   

C#

 
AnswerRe: Nested DataGridView Pin
Henry Minute30-Jul-09 3:58
Henry Minute30-Jul-09 3:58 
GeneralRe: Nested DataGridView Pin
Muammar©30-Jul-09 7:28
Muammar©30-Jul-09 7:28 
QuestionExcel app to C# winform Pin
Dimitris Nemtsov29-Jul-09 22:47
Dimitris Nemtsov29-Jul-09 22:47 
AnswerRe: Excel app to C# winform Pin
jasonmp19-Nov-10 4:56
jasonmp19-Nov-10 4:56 
GeneralRe: Excel app to C# winform Pin
Dimitris Nemtsov19-Nov-10 10:25
Dimitris Nemtsov19-Nov-10 10:25 
Questioncreate a control inside a thread and update it Pin
Vivek Vijayan29-Jul-09 22:32
Vivek Vijayan29-Jul-09 22:32 
AnswerRe: create a control inside a thread and update it Pin
Luc Pattyn29-Jul-09 23:14
sitebuilderLuc Pattyn29-Jul-09 23:14 
QuestionSending(Play) voice via modem by AT Command Pin
Mahyar_Habibpour29-Jul-09 22:13
Mahyar_Habibpour29-Jul-09 22:13 
Hi I need a code for playing "wav" file via modem.
I work without any component or dll file and just by AT Command and SerialPort.
in my program, i dial to a phone number by this code:

serialPort1.PortName = "COM3";
serialPort1.BaudRate = 9600;
serialPort1.DataBits = 8;
serialPort1.StopBits = System.IO.Ports.StopBits.One;
serialPort1.Parity = System.IO.Ports.Parity.None;
serialPort1.Handshake = System.IO.Ports.Handshake.None;
//serialPort1.DtrEnable = true;


try
{
if (serialPort1.IsOpen) serialPort1.Close();
serialPort1.Open();
serialPort1.Write("ATZ" + Convert.ToChar(13));
serialPort1.Write("AT+FCLASS=8"+ Convert.ToChar(13));

serialPort1.Write("ATDT"+txtTel.Text + Convert.ToChar(13));
serialPort1.Write("AT+VSM=129,8000"+ Convert.ToChar(13));
serialPort1.Write("AT+VSD=128,0"+ Convert.ToChar(13));
serialPort1.Write("AT+FLO=2" + Convert.ToChar(13));
serialPort1.Write("AT+VTX" + Convert.ToChar(13));

}
catch
{
MessageBox.Show("Can not open Port");
}



...
and then send "wav" file by this Function:

private void SendVoiceData()
{
byte[] buffer = new byte[20000];

FileStream strm = new FileStream("voice.wav", System.IO.FileMode.Open);
//MemoryStream ms = new MemoryStream();
//int count= ms.Read(bt, 0, 10000);
rdr = new BinaryReader(strm);

while (true)
{
byte[] bt=new byte[1024];
bt = rdr.ReadBytes(1024);

serialPort1.Write(bt,0,bt.Length);

}

}

Please Help me how can i play a "wav" file via modem.
tnx
AnswerRe: Sending(Play) voice via modem by AT Command Pin
Mahyar_Habibpour30-Jul-09 1:07
Mahyar_Habibpour30-Jul-09 1:07 
AnswerRe: Sending(Play) voice via modem by AT Command Pin
Jimmanuel30-Jul-09 1:12
Jimmanuel30-Jul-09 1:12 
GeneralRe: Sending(Play) voice via modem by AT Command Pin
Mahyar_Habibpour30-Jul-09 2:17
Mahyar_Habibpour30-Jul-09 2:17 
GeneralRe: Sending(Play) voice via modem by AT Command Pin
Jimmanuel30-Jul-09 2:41
Jimmanuel30-Jul-09 2:41 
GeneralRe: Sending(Play) voice via modem by AT Command Pin
Mahyar_Habibpour31-Jul-09 9:18
Mahyar_Habibpour31-Jul-09 9:18 
Questionformat DataGridViewTextBoxColumn as number as the user is typing the value Pin
acroitoriu29-Jul-09 21:58
acroitoriu29-Jul-09 21:58 
AnswerRe: format DataGridViewTextBoxColumn as number as the user is typing the value Pin
shine_paravur29-Jul-09 23:45
shine_paravur29-Jul-09 23:45 
QuestionHow can i crop only the used part of a Bitmap? Pin
bonzaiholding29-Jul-09 21:36
bonzaiholding29-Jul-09 21:36 
AnswerRe: How can i crop only the used part of a Bitmap? Pin
stancrm29-Jul-09 21:41
stancrm29-Jul-09 21:41 
GeneralRe: How can i crop only the used part of a Bitmap? Pin
bonzaiholding29-Jul-09 22:39
bonzaiholding29-Jul-09 22:39 
AnswerRe: How can i crop only the used part of a Bitmap? Pin
Luc Pattyn29-Jul-09 22:17
sitebuilderLuc Pattyn29-Jul-09 22:17 
GeneralRe: How can i crop only the used part of a Bitmap? Pin
bonzaiholding29-Jul-09 22:44
bonzaiholding29-Jul-09 22:44 
GeneralRe: How can i crop only the used part of a Bitmap? Pin
Luc Pattyn29-Jul-09 22:58
sitebuilderLuc Pattyn29-Jul-09 22:58 
GeneralRe: How can i crop only the used part of a Bitmap? Pin
jasonmp19-Nov-10 5:00
jasonmp19-Nov-10 5:00 
AnswerRe: How can i crop only the used part of a Bitmap? Pin
Moreno Airoldi30-Jul-09 0:09
Moreno Airoldi30-Jul-09 0:09 
QuestionRequired data through http connection Pin
honeyashu29-Jul-09 21:01
honeyashu29-Jul-09 21:01 
AnswerRe: Required data through http connection Pin
SeMartens29-Jul-09 21:08
SeMartens29-Jul-09 21:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.