c# - Progress Bar not Visible -
if create progressbar
via toolbox
, add following line in code:
progressbar1.value = 40;
i able view progress bar when application runs.
however, if try create 1 via code, unable view 1 - progress bar not visible. here code:
progressbar progressbar1 = new progressbar(); progressbar1.location = new system.drawing.point(168, 180); progressbar1.height = 650; progressbar1.width = 340; progressbar1.minimum = 20; progressbar1.maximum = 100; progressbar1.value = 49; progressbar1.visible = true;
if using windows forms must add form that:
this.controls.add(progressbar1);
if using wpf must that:
this.children.add(progressbar1);