Hello, Merry Christmas everyone.
I am creating a new form and at the time of its creation, I get this dialog that I will add your image.
What does "Dialog Management" mean?
And if it is interesting to me how I mark this option in a form that I created in the past but that does not mark this option?
Thank you and happy day.
What does "Dialog Management" mean?
- gambafeliz
- Posts: 139
- Joined: Friday 2nd September 2022 7:50pm
- Location: I live in the same city as Picasso
What does "Dialog Management" mean?
For your misfortunes I am Spanish and I only know Spanish, please, be patient with me, Thank you.
- cogier
- Site Admin
- Posts: 1118
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: What does "Dialog Management" mean?
I tried this and got a couple of buttons on the form (OK and Cancel) and the following code was already created.
Public Sub Run() As Boolean
Return Not Me.ShowModal()
End
Public Sub btnOK_Click()
Me.Close(True)
End
Public Sub btnCancel_Click()
Me.Close
End
- gambafeliz
- Posts: 139
- Joined: Friday 2nd September 2022 7:50pm
- Location: I live in the same city as Picasso
Re: What does "Dialog Management" mean?
Aaah thank you
For your misfortunes I am Spanish and I only know Spanish, please, be patient with me, Thank you.
- BruceSteers
- Posts: 1523
- Joined: Thursday 23rd July 2020 5:20pm
- Location: Isle of Wight
- Contact:
Re: What does "Dialog Management" mean?
Yes it creates a Form with a Dialog template ready to go.cogier wrote: ↑Sunday 25th December 2022 12:50pm I tried this and got a couple of buttons on the form (OK and Cancel) and the following code was already created.
Public Sub Run() As Boolean Return Not Me.ShowModal() End Public Sub btnOK_Click() Me.Close(True) End Public Sub btnCancel_Click() Me.Close End
The default methods Cogier has shown there work like Dialog.OpenFile() in the way that the return is considered an error state so it returns false for an "okay" button press and true if the user presses Cancel. (always seems back to front to me but you can change it by switching the btnOk and btnCancel click event code)
But by default you can use the dialog form in your code like this...
(creating a Static variable in MyDialogWindow.class called StaticAnswerVar that get's filled when user presses okay in the dialog)
If MyDialogWindow.Run() Then
Print "User cancelled Dialog"
Else
Print "Result was " & MyDialogWindow.StaticAnswerVar
Endif
The form, of course, will also be a Modal window so unlike a normal form it will lock your application while it's open.
If at first you don't succeed , try doing something differently.
BruceS
BruceS
- gambafeliz
- Posts: 139
- Joined: Friday 2nd September 2022 7:50pm
- Location: I live in the same city as Picasso
Re: What does "Dialog Management" mean?
Thank you BruceS
It's interesting information.
It's interesting information.
For your misfortunes I am Spanish and I only know Spanish, please, be patient with me, Thank you.