guess what!!! I have found out a solution to this problem.
Its very simple. Actually, you need not change the port number can stop the service of MS IIS by following the simple steps given below!
1. Go to run.
2. type "optionalfeatures.exe" in the run box.
3. Press enter (OK)
4. Now a prompt box named "Windows features" will open.
5. There, search for "Internet Information Services" and uncheck the box to stop its function.
6. Press "OK".
7. Now, your system will be restarted and the settings will be changed.
8. After ur computer has restarted, you can put your server to online or offline without any error on clicking on the small icon (which is white in color which means that it has started using its own port i.e. 80 and it has stated functioning.
That's it! done. After this, you can open your localhost and phpmyadmin.
If u don't know how to continue after this, check out the following video.
Hope this is helpful to other people having the same problem, like me!