locked
how to run this progress bar for limited time RRS feed

  • Question

  • please anyone help me !

    i want to run this progress bar for limited time 5 second

    and after 5 second i want to go  new subrutine 

    Sub old
     

    pb=LDControls.AddProgressBar(400,20,"h")
      Shapes.Move(pb, 50,400)
      LDControls.ProgressBarValue(pb, 100)

    endsub

    sub new

    ----------------

    endsub

    Wednesday, August 24, 2016 3:58 PM

Answers

  • Old()
    Sub Old
      timer.tick = New
      Timer.Interval = 5000 'After 5 seconds the Program will run the sub called new
      
      Timer.Pause()
      pb=LDControls.AddProgressBar(400,20,"h")
      Shapes.Move(pb, 50,400)
      LDControls.ProgressBarValue(pb, 100)
      Timer.Resume()
    EndSub

     

    Sub new
      Controls.HideControl(pb) 'Hids Progress Bar
      '---------------- Enter Other Code Here
    EndSub

    I think that should solve your problem @msdn.yogesh
    • Marked as answer by msdn.yogesh Wednesday, August 24, 2016 4:50 PM
    Wednesday, August 24, 2016 4:30 PM
  • Here is a variation:

    GraphicsWindow.width=500
    GraphicsWindow.height=500
    GraphicsWindow.top=0
    GraphicsWindow.left=0
    GraphicsWindow.fontsize=35
    num=Shapes.AddText("")
      pb=LDControls.AddProgressBar(400,20,"h")
      Shapes.ShowShape(pb)
      Shapes.Move(pb, 50,400)
      Shapes.Move(num,250,250)
     
      For Time = 1 To 100
        LDControls.ProgressBarValue(pb, time)
        ' do something
        'GraphicsWindow.DrawBoundText(250,250,200,time)
        Shapes.settext(num,time)
        Program.Delay( 100 )
      EndFor

    • Marked as answer by msdn.yogesh Monday, July 3, 2017 6:34 PM
    Wednesday, August 24, 2016 8:14 PM
    Answerer

All replies

  • Old()
    Sub Old
      timer.tick = New
      Timer.Interval = 5000 'After 5 seconds the Program will run the sub called new
      
      Timer.Pause()
      pb=LDControls.AddProgressBar(400,20,"h")
      Shapes.Move(pb, 50,400)
      LDControls.ProgressBarValue(pb, 100)
      Timer.Resume()
    EndSub

     

    Sub new
      Controls.HideControl(pb) 'Hids Progress Bar
      '---------------- Enter Other Code Here
    EndSub

    I think that should solve your problem @msdn.yogesh
    • Marked as answer by msdn.yogesh Wednesday, August 24, 2016 4:50 PM
    Wednesday, August 24, 2016 4:30 PM
  • Thank you so much .......................

    Exact Solution.......................


    Wednesday, August 24, 2016 4:48 PM
  • Here is a variation:

    GraphicsWindow.width=500
    GraphicsWindow.height=500
    GraphicsWindow.top=0
    GraphicsWindow.left=0
    GraphicsWindow.fontsize=35
    num=Shapes.AddText("")
      pb=LDControls.AddProgressBar(400,20,"h")
      Shapes.ShowShape(pb)
      Shapes.Move(pb, 50,400)
      Shapes.Move(num,250,250)
     
      For Time = 1 To 100
        LDControls.ProgressBarValue(pb, time)
        ' do something
        'GraphicsWindow.DrawBoundText(250,250,200,time)
        Shapes.settext(num,time)
        Program.Delay( 100 )
      EndFor

    • Marked as answer by msdn.yogesh Monday, July 3, 2017 6:34 PM
    Wednesday, August 24, 2016 8:14 PM
    Answerer