VB.net and Arduino communication problem

String a= "";
String val = 0;

You have a limited amount of memory on the Arduino. Using a String object to receive a 2 character input is the ultimate in laziness.

Your problem is a unrealistic expectation about how serial data is transmitted. The key to understanding serial data transmission is to understand that it is sssslllloooowwww.

You are expecting the serial data to arrive all at once. It does not. There may be a thousand iterations of loop between the time the L arrives and the time that the 1 arrives, when you enter L1 and press Send.

Serial.flush() is almost certainly a mistake. Unless you KNOW what it is doing, and have very good reason to have it there, get rid of it.