I am working on an application that loads settings from a stored config file. When I load these settings, which contain a font and color, and then assign it to the "preview" Label, the Label no longer shows text. I even have it so that you can change this text, and after doing so, it still does not show any text. Here is the code that I am using to set the font and text color from the file.
myFont = New Font(strfontName, intfontSize, style:=strfontStyle)
txtPreview.Font = myFont
txtPreview.ForeColor = clrfontColor
txtPreview.BackColor = picBackColor.BackColor
txtPreview.Refresh()
txtPreview is a regular Label. It has the text value of 'Sample Text'.
The 'strfontName' is a string value that holds the name of the font loaded from the file.
The 'intfontSize' is also loaded from the file and is an integer value.
The 'strFontStyle' is an integer value that is also loaded from file.
When I step through the application, everything looks good, but the Label just stops working.
Any ideas?
myFont = New Font(strfontName, intfontSize, style:=strfontStyle)
txtPreview.Font = myFont
txtPreview.ForeColor = clrfontColor
txtPreview.BackColor = picBackColor.BackColor
txtPreview.Refresh()
txtPreview is a regular Label. It has the text value of 'Sample Text'.
The 'strfontName' is a string value that holds the name of the font loaded from the file.
The 'intfontSize' is also loaded from the file and is an integer value.
The 'strFontStyle' is an integer value that is also loaded from file.
When I step through the application, everything looks good, but the Label just stops working.
Any ideas?
Last edited by a moderator: