KMatle Expert Licensed User Longtime User Sep 13, 2018 #1 I wonder why the _CloseRequest method is only working with MainForm. I would expect the real name like in my example code: LoginForm It only works with "MainForm". Any ideas? Code: Copy Sub AppStart (Form1 As Form, Args() As String) LoginForm = Form1 LoginForm.RootPane.LoadLayout("LoginLO") 'Load the layout file. LoginForm.Show End Sub Code: Copy Sub MainForm_CloseRequest (EventData As Event) If fx.Msgbox2(LoginForm, "Wollen Sie das Programm beenden?", "Programm beenden?", "Ja", "", "NEIN", fx.MSGBOX_WARNING) <> fx.DialogResponse.POSITIVE Then EventData.Consume Else ... End If End Sub
I wonder why the _CloseRequest method is only working with MainForm. I would expect the real name like in my example code: LoginForm It only works with "MainForm". Any ideas? Code: Copy Sub AppStart (Form1 As Form, Args() As String) LoginForm = Form1 LoginForm.RootPane.LoadLayout("LoginLO") 'Load the layout file. LoginForm.Show End Sub Code: Copy Sub MainForm_CloseRequest (EventData As Event) If fx.Msgbox2(LoginForm, "Wollen Sie das Programm beenden?", "Programm beenden?", "Ja", "", "NEIN", fx.MSGBOX_WARNING) <> fx.DialogResponse.POSITIVE Then EventData.Consume Else ... End If End Sub
Daestrum Expert Licensed User Longtime User Sep 13, 2018 #2 https://www.b4x.com/android/forum/t...nt-fire-on-renamed-windows.96653/#post-609799 Upvote 0