I am wanting to write the color values to a ini file for later use. This is the code I am using and what the output is. Am I doing it right or would you recommend a different approach?
VB Code:
Option Explicit
Private Sub cmdBackgroundColor_Click()
ShowColorPicker
lblColorScheme.BackColor = CDlgColorPicker.Color
End Sub
Private Sub cmdForegroundColor_Click()
ShowColorPicker
lblColorScheme.ForeColor = CDlgColorPicker.Color
End Sub
Private Sub ShowColorPicker()
With CDlgColorPicker
.Flags = cdlCCFullOpen
.ShowColor
.CancelError = True
End With
End Sub
Private Sub cmdSave_Click()
Dim intFF As Integer, strFileName As String, strFileLocation As String
intFF = FreeFile
strFileName = "ColorScheme.ini"
strFileLocation = App.Path & "\" & strFileName
Open strFileLocation For Output As #intFF
With lblColorScheme
Print #intFF, .BackColor & "|" & .ForeColor
End With
Close #intFF
End Sub
output is: