VC++ communicates with Arduino

Hi,everyone.
I reference VC++ and Arduino communication over the network via USB.
But I have a serious problem.
I want to use a double-layer if loop,because I want to pass in an instruction to indicate that I am going to pass the value.
however enter the second if loop, C++ forced interrupt arduino busy wait.
Does anyone have a similar experience,please?
Please help me if you can, I will be very grateful to you.

The following reference website is attached.
https://blog.manash.me/serial-communication-with-an-arduino-using-c-on-windows-d08710186498

Attach the picture that actually encountered difficulty

picture1 arduino (I want the result but he is on the Arduino compiler)
picture2 Visual studio (Arduino was forcibly interrupted by VC++)

The following is the arduino code
http://codepad.org/nK99Uh5d

Here are:

#define BAUD 9600
#define led 13

void setup(){
  Serial.begin(BAUD);
  pinMode(led, OUTPUT);
}

void loop(){
  String input;
  Serial.println("OK");

  if(Serial.available() > 0){
    input = Serial.readStringUntil('\n');
  } 
  
  if(input == "1"){   
       while (Serial.available()<=0){
        input = Serial.read();
         Serial.println("*");
      }
      delay(3000);
    if(Serial.available() > 0){
    input = Serial.readStringUntil('\n');
    Serial.println("+");
    Serial.println(input);
    Serial.println("++");
    }  
    
    digitalWrite(led, HIGH);
    Serial.println("Led is on");

  } 

  if (input == "OFF")
  {
    digitalWrite(led, LOW);
    Serial.println("Led is off");
  }
  
  input = "";
}