私の他の回答に対するあなたのコメントから推測される私は、INIファイルから値を読み取る方法に関する新しい回答を投稿しています。
Imports System.Text
Imports System.Runtime.InteropServices
Public Class TestForm
'declare the API
<DllImport("kernel32.dll", SetLastError:=True)> _
Private Shared Function GetPrivateProfileString(ByVal lpAppName As String, _
ByVal lpKeyName As String, _
ByVal lpDefault As String, _
ByVal lpReturnedString As StringBuilder, _
ByVal nSize As Integer, _
ByVal lpFileName As String) As Integer
End Function
'Function to retrieve a value from an INI file
Public Function GetINIValue(filename As String, section As String, key As String, Optional defaultValue As String = "") As String
Dim res As Integer
Dim sb As New StringBuilder(500)
res = GetPrivateProfileString(section, key, "", sb, sb.Capacity, filename)
If res = 1 Then Return sb.ToString Else Return defaultValue
End Function
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim filename As String = "C:\Scratch\Test.ini"
CheckBox1.Checked = If(GetINIValue(filename, "Display", "bFXAAEnabled") = "1", True, False)
End Sub
End Class