Program that has a FrmOptions.VB form with a ComboBox to select a language.
FrmOptions is opened by a OptionsToolStripMenuItem.Click, handled in the FrmMain form.
The code of the Combo in the FrmOptions form:
Private Sub CmbLang_SelectedIndexChanged(sender As Object, e As EventArgs) Handles CmbLang.SelectedIndexChanged
If Not CmbLang.Focused Then 'to avoid unwanted calls
Debug.Print("Return for ComboBoxLang NOT Focused at " & Now.ToString)
Return
End If
'Some code to change the language
End Sub
The Output when I run the program without to access the OptionsToolStripMenuItem.Click and without to Show FrmOptions:
Return for ComboBoxLang NOT Focused at 21/02/2023 19:58:49
Why?? How is possible that the program fires the event of a Form that is currently Closed and never opened?