NewsBot
1
Well I have been working on a program lately, and in my options dialog I want the font to match the systems default font. I figured that if I use a For Each loop and* get all controls from there, I could set the font for all of them.* Here's the code:
' Sets all controls to the default MessageBoxFont, which under Windows Vista, is Segoe UI.
ForEach currentcontrol As Control InMe.Controls
Dim theControl AsNew Control
theControl = DirectCast(currentcontrol, TextBox)
theControl.Font = SystemFonts.MessageBoxFont
Next
Is there an easier way to do this?
More...
View All Our Microsoft Related Feeds
' Sets all controls to the default MessageBoxFont, which under Windows Vista, is Segoe UI.
ForEach currentcontrol As Control InMe.Controls
Dim theControl AsNew Control
theControl = DirectCast(currentcontrol, TextBox)
theControl.Font = SystemFonts.MessageBoxFont
Next
Is there an easier way to do this?
More...
View All Our Microsoft Related Feeds