I've researched this a bit and can't seem to find an answer. A few articles here on SO also go unanswered or provide answers that don't seem to work so I'm running out of luck and hoping someone can help.
I've got a WinForms project, coded in VB.Net, using .Net Framework 4.6.2.
I wanted to the app to load in the system tray, and when clicked the actual form comes up. I got this to work using feedback from another article which implies creating a separate Module, include a Sub Main() declaration, load the Notification item in there and when system tray icon is clicked then load the main form.
To do this, I had to go to my project settings, select the "Sub Main" as the startup object, and un-check the "Enable application framework" box.
Everything works as it's supposed to, the notification icon is loaded in the taskbar, and when clicked my form opens up.
Here's the issue, when my buttons are rendered they look way different than when I setup the project to run the form instead of the windowless module. Example:
Buttons should look like:
But look like:
A few articles pointed to enabling the following options in my main module:
Application.EnableVisualStyles()
Application.SetCompatibleTextRenderingDefault(True)
Application.DoEvents()
This fixed the way my ListViews were rendering, but not the text. As you can see in the images, the top one is much more smooth and well-spaced than the bottom which looks bolder and misaligned.
I've tried changing the form's AutoScaleMode settings, AutoSize, and nothing works.
Any idea on how to fix this?