Nothing happens without determination. The real treatment to prevent lustful glances is to think at that moment:
“Allah SWT is watching me now and on the Day of Judgment I will be questioned regarding this. And if Allah SWT condemns me for punishment what will happen of me?”
- By recalling this repeatedly again and again one will attain success.
- Therefore, make strong determination.
This is the only treatment. Initially for few days there will be some hardship indeed, but eventually, inshaAllah, it will become a habit. And then the gratification and peace you find in it can only be imagined of. (Basair-e-Hakeemul-e-Ummat 369)
source: Ashrafiya blog
Maulana Hakeem Akhtar Saheb reminds us of the following qudsi hadith narrated by the Prophet (pbuh):
"The gaze is a poisonous arrow from among the arrows of Iblis (satan). Whoever protected his heart and gaze from this arrow due to My fear, I will grant him the sweetness of Imân that he will perceive in his heart."