servo moving very slow,only works for delay of 1500 or more

nope , i tried everything ,even the servo motors are responding fast enough when communicating via serial monitor of arduino ide, but it lags behind when trying to communicate with cpp code. i still don't know why?

You really are at risk of frying your Arduino if you power a motor or servo from the 5V logic supply - don't do that, use a separate supply if at all possible - once the hardware is set up safely, then worry about the software.

anuran:
nope , i tried everything ,even the servo motors are responding fast enough when communicating via serial monitor of arduino ide, but it lags behind when trying to communicate with cpp code. i still don't know why?

What cpp code? I don't understand that.

the microsoft visual c ++ controller code which is ending mouse coordinates mentioned at reply#11

while(1)
    {   	
      GetCursorPos(&coord);	
      answer=Convert::ToString(int(coord.x/7.80))->PadLeft(3,'0');
      //7.80 is scaleing factor of screenwidth by max angle of servo motor

      //if mouse moves to new location	
      if(String::Compare(answer,answernew))	
      {
        answernew=answer;	
        Sleep(1500);	//servo moving only after this delay or more
        //1 is motor no im trying to control 	
        arduino->Write(String::Concat("1",answernew));
      }
    }

Well, you have a large pause before telling it to move. Why?

if i dont add this servo wont even move,with this delay servo moves after 1500ms delay but still not smoothly.i tried with reducing delay or removing it.but only after delay of 1500 or more servo moves with respective delay.