You can't just remove lines of code and expect it to work. I still don't understand what you're trying to do. The code will iterate through each controls on your Form including menu items, it checks if the control is a menu item and in that case it changes its caption to the text you have in your INI file.

That is what the code is doing! If you want it to do something else you just need to describe a bit better what that is.