Jump to content

Recommended Posts

Posted

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

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...