Women in Technology

Hear us Roar



Article:
  Putting a Browser into Your Windows Application
Subject:   Error in example
Date:   2005-09-01 07:09:59
From:   MMS
the line
progressBar1.Value = (int)((e.CurrentProgress / e.MaximumProgress)*100);

should be changed to


progressBar1.Value = (int)(((double)e.CurrentProgress / e.MaximumProgress)*100);


to avoid using integer division (that will only produce 0 and 100! )