Billboards, Gatesboards and others
What is the one thing that makes a setup look cool? Billboards!
But the damn progress bar in file copy is a picture box so we can't get the percentage which is needed to change the billboard images... so what do we do?
We create 'timed' billboards! Remember that image box control we made in Part 2? We will use it to show these billboards. I don't remember that image control's name (oops) so we'll call it imgBill (do not add 'Gates' as a suffix).
Then, we create a few BMP files (for this, we use 3 files) and keep them under 64kb. Now we load these images in a resource file (see part 3 for details).
Now, here's what to do:
- First run your installation and get the average time that it takes to copy the files. Try running it on a P-II 300 based system, then on a P-MMX 166 based system, from both the times, create an average time (approximate value will do)
- Assuming it takes 20 seconds for the installation at average, that is what we will do to the timer give it 20 seconds to display multiple billboards.
- Create Timer1 on frmCopy.frm and set its Timer property to 1000 (1 second)
- In frmCopy declarations section, add the following line:
Public intBill As Integer
- Now add the following code in Timer1_Timer() event:
Private Sub Timer1_Timer()IntBill = IntBill + 1If IntBill = 6 Then imgBill.Picture = _LoadResPicture("Bill2", vbResBitmap)' In the above we load Bill2 instead of Bill1 as Bill1' Will be loaded in Form_Load()if intBill = 12 Then imgBill.Picture = _LoadResPicture("Bill3", vbResBitmap)End SubPrivate Sub Form_Load()imgBill.Picture = LoadResPicture("Bill1", vbResBitmap)End Sub
That was easy, we're finished with bill boarding!!
Page 5 of 7