I have an application that I am writing and i was initially using a form as the startup, but I want to use sub Main() as the start. This is the sub
VB Code:
Sub main() Application.EnableVisualStyles() Application.DoEvents() 'Check to see if an installer is flagged for deletion Dim inFile As String = My.Settings.KillInstaller 'if updates are enabled then do a check If My.Settings.enableUpdates = True Then 'if flagged, delete the recent installer If inFile <> String.Empty Then 'check to see if installer exists in the temp directory If IO.File.Exists(My.Computer.FileSystem.SpecialDirectories.Temp & "\" & inFile) Then 'Delete the previous installer IO.File.Delete(My.Computer.FileSystem.SpecialDirectories.Temp & "\" & inFile) 'Update my.settings flag My.Settings.KillInstaller = String.Empty End If End If 'Check for any new updates and run the update form if any exist If checkUpdates() Then Exit Sub End If 'Run the login screen Application.Run(New Login) Application.Exit() End Sub
It does a few things that are irrelevant to my question, which is this. I have enableVisualStyles in the sub, however when the application is run from this method, as opposed to haveing a form as startup item, all the linkLabels in my application look horrible, almost like it is changing the font. Has anyone else seen anything like this or perhaps see any errors in my code?
Thanks






Reply With Quote