by Robert Gray (2 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 15th June 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Allow your users the ability to toggle the state of the text, on all controls, on your screens between Bold and Normal, and save their choose.
On Error Resume Next
Dim ctlControl As Variant
For Each ctlControl In fForm.Controls
ctlControl.FontBold = bFontBold
'some controls support the FontBold property
'others support the Font.Bold method (such as the Status
'Panel, ListView, TreeView, Tab Controls, etc)
If ctlControl.Tag = "Special" Then
ctlControl.Font.Bold = bFontBold
End If
Next ctlControl
If bFontBold = True Then
SaveSetting "YourAppName", "Screen Settings", "Display Bold Text", "Yes"
Else
SaveSetting "YourAppName", "Screen Settings", "Display Bold Text", "No"
End If
End Sub
Public Sub GetAppSettings()
Dim AppSetting As String
AppSetting = GetSetting("YourAppName", "Screen Settings", "Display Bold Text")
If AppSetting = "" Or AppSetting = "No" Then
bSetTextToBold = False
Else
bSetTextToBold = True
Endif
AppSetting = ""
In the Form Load event of each form in your project, place
If bSetTextToBold = True Then
MakeBold True, Me
Endif
No comments have been posted about Allow your users the ability to toggle the state of the text, on all controls, on your screens betw. Why not be the first to post a comment about Allow your users the ability to toggle the state of the text, on all controls, on your screens betw.