Results 1 to 7 of 7

Thread: Progress bar for the shelled process

Threaded View

  1. #2
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: Progress bar for the shelled process

    Doing a real progress bar would require the shelled program to somehow be able to return it's progress to your program; in this case what you're requesting is impossible (or for the least very hard to do without further knowledge of internals of the shelled program). However, you could do a progress bar that doesn't really show anything else than that a progress is going on. I guess you've sometime seen a progress bar that has about 100 pixels wide "bar" that loops from left to right, bar coming in from the left and going out of the right, until everything is done?


    Edit!
    A poor man's sample: add Picture1, Label1 into Picture1 and a Timer1 to a new project. Paste this code:
    VB Code:
    1. Option Explicit
    2.  
    3. Private Sub Form_Load()
    4.     Picture1.ScaleMode = vbPixels
    5.     Picture1.BackColor = vbHighlightText
    6.     Label1.BackColor = vbHighlight
    7.     Label1.Caption = vbNullString
    8.     Label1.Move -100, 0, 100, Picture1.ScaleHeight
    9.     Timer1.Interval = 1
    10. End Sub
    11.  
    12. Private Sub Timer1_Timer()
    13.     If Label1.Left <= Picture1.ScaleWidth Then
    14.         Label1.Left = Label1.Left + 5
    15.     Else
    16.         Label1.Left = -100
    17.     End If
    18. End Sub
    Last edited by Merri; Aug 26th, 2006 at 03:41 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width