F
Fred Boer
Hello:
I'm playing with a settings form, using code reproduced below. After the
user changes the setting, the change is instantly applied. I can make the
application icon change properly, but the icon on the form's menu bar
doesn't change. Me.Form.Repaint doesn't do it... Is there a way to "refresh"
form title bars?
Thanks!
Fred Boer
Private Sub txtPathToAppIcon_AfterUpdate()
On Error GoTo ErrorHandler
Dim db As DAO.Database
If Me.Dirty Then Me.Dirty = False
Set db = CurrentDb()
' Change the application icon. Pull application icon path from settings
table.
db.Properties!AppIcon = Me.txtPathToAppIcon
' Update title bar on screen.
Application.RefreshTitleBar
db.Close
Set db = Nothing
ExitPoint:
Exit Sub
ErrorHandler:
fncErrorMessage Err.Number, Err.Description
Resume ExitPoint
End Sub
I'm playing with a settings form, using code reproduced below. After the
user changes the setting, the change is instantly applied. I can make the
application icon change properly, but the icon on the form's menu bar
doesn't change. Me.Form.Repaint doesn't do it... Is there a way to "refresh"
form title bars?
Thanks!
Fred Boer
Private Sub txtPathToAppIcon_AfterUpdate()
On Error GoTo ErrorHandler
Dim db As DAO.Database
If Me.Dirty Then Me.Dirty = False
Set db = CurrentDb()
' Change the application icon. Pull application icon path from settings
table.
db.Properties!AppIcon = Me.txtPathToAppIcon
' Update title bar on screen.
Application.RefreshTitleBar
db.Close
Set db = Nothing
ExitPoint:
Exit Sub
ErrorHandler:
fncErrorMessage Err.Number, Err.Description
Resume ExitPoint
End Sub