0

i have gammu service and it is already run in windows. Today i wanna ask about how to check balance based my modem using gammu and c#. i have tried using command prompt to check my balance in gammu.

here is the screenshoot of my command: enter image description here

i wanna ask how to implement this command in C# using textboxt and button then get result in textbox. this is my form:

enter image description here

this my code to to try check balanced in gammu and display it in textBoxtresult but it doesn't work:

private string strHasil;
private void btnCheck_Click(object sender, EventArgs e)
{
    Process myProses = new Process();
    Process.Start(@"c:\gammu\bin gammu getussd " + txtUSSD.Text);
    myProses.Close();
    txtHasilPulsa.Text = strHasil;
}

need help and suggestion... thanks..

mybirthname
  • 17,539
  • 3
  • 30
  • 53
aminvincent
  • 553
  • 1
  • 11
  • 40
  • 1
    Looks like ýour path is not correct. Shouldn't it say Process.Start(@"c:\gammu\bin\gammu getussd " + txtUSSD.Text); instead? – Jannik Oct 18 '16 at 05:08
  • how to solve this any suggest? – aminvincent Oct 18 '16 at 05:42
  • http://stackoverflow.com/questions/4291912/process-start-how-to-get-the-output Further more check out this question. You have to somehow redirect the output to your TextBox. – Jannik Oct 19 '16 at 08:03

0 Answers0