Here's some source code for those who have a huge list of
fonts and would like to show some kind of indication that fonts are loading.
The Timer1 control is simply there to allow the font loading indicator form to be displayed, if the timer wasn't present, I found the form that suposed to be shown DID NOT! You can set the Timer1 interval to a low 5, this at least gives the indicator form time to show itself.
Remember, The Timer1 control is on the indicator form NOT the form that is loading. The form that is loading simply wont show itself untill all the fonts are loaded into the combo box of that form.
---------------------------------------------------------------------
TIMER CONTROL AND PROGRESS BAR IS PLACE ON 'frmLoadFonts' FORM.
Private Sub Timer1_Timer()
'//Set the mouse pointer to show an hourglass.
Screen.MousePointer = vbHourglass
'//Load 'frmMain' which triggers Progress bar.
Load frmMain
'//Fonts are now loaded so set mouse pointer to default.
Screen.MousePointer = vbDefault
'//Unload 'frmLoadFonts' and set it to nothing.
Unload Me
Set frmLoadFonts = Nothing
'//Show frmMain that now has all screen fonts in combo box.
frmMain.Show
End Sub
---------------------------------------------------------------------
frmMain IS NOW EXECUTING THE CODE BELOW BEFORE ITS BEEN SHOWN.
Private Sub Form_Load()
'//Set the Progress bar Maximum value to fontcount.
frmLoadFonts.ProgressBar1.Max = Screen.FontCount
'//Set "i" to load fonts as well as for progress bar.
For i = 0 To Screen.FontCount - 1
cmbFontName.AddItem Screen.Fonts(i)
'//Progress bar is moving along till reaches fontcount.
frmLoadFonts.ProgressBar1.Value = i
Next i
'//Show us the first fontname in the list.
.ListIndex = 0
End Sub
fonts and would like to show some kind of indication that fonts are loading.
The Timer1 control is simply there to allow the font loading indicator form to be displayed, if the timer wasn't present, I found the form that suposed to be shown DID NOT! You can set the Timer1 interval to a low 5, this at least gives the indicator form time to show itself.
Remember, The Timer1 control is on the indicator form NOT the form that is loading. The form that is loading simply wont show itself untill all the fonts are loaded into the combo box of that form.
---------------------------------------------------------------------
TIMER CONTROL AND PROGRESS BAR IS PLACE ON 'frmLoadFonts' FORM.
Private Sub Timer1_Timer()
'//Set the mouse pointer to show an hourglass.
Screen.MousePointer = vbHourglass
'//Load 'frmMain' which triggers Progress bar.
Load frmMain
'//Fonts are now loaded so set mouse pointer to default.
Screen.MousePointer = vbDefault
'//Unload 'frmLoadFonts' and set it to nothing.
Unload Me
Set frmLoadFonts = Nothing
'//Show frmMain that now has all screen fonts in combo box.
frmMain.Show
End Sub
---------------------------------------------------------------------
frmMain IS NOW EXECUTING THE CODE BELOW BEFORE ITS BEEN SHOWN.
Private Sub Form_Load()
'//Set the Progress bar Maximum value to fontcount.
frmLoadFonts.ProgressBar1.Max = Screen.FontCount
'//Set "i" to load fonts as well as for progress bar.
For i = 0 To Screen.FontCount - 1
cmbFontName.AddItem Screen.Fonts(i)
'//Progress bar is moving along till reaches fontcount.
frmLoadFonts.ProgressBar1.Value = i
Next i
'//Show us the first fontname in the list.
.ListIndex = 0
End Sub