Topic: Modeless window
Is it possible to have a Modeless window in MVD, if so how?
God... please help me become the person my dog thinks I am.
My Visual Database → General → Modeless window
Is it possible to have a Modeless window in MVD, if so how?
Yes, but only using script, example:
procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
begin
Form2.Show;
end;
Great.. Thanks a lot Dmitry.........
Hi Dmitry,
I Could't get it work
Hello Adam,
I think there are two things that you need to look at.
1. In your script, you are calling 'form2.show' from the form1_button1_onclick procedure but you have attached the form1_button1_onclick procedure to form1 itself (form1_onclick). As far as I know, this can only happen if you have copied it from somewhere else and pasted it to the wrong object/event.
2.. You have a 'new record' action attached to form1.button1. I don't understand why you would want a 'new record' action AND a script event to both call form2.
Derek.
Hi Derek,
I wanted to have modeless window/s but implementation of Dmitry's script by me obviously incorrect.
Hi Adam,
If that is all you are wanting to do, I'm not sure why you need to have a separate form at all. Can you not just put your memo1, edit 1 and 2 buttons all on the same form? It doesn't matter if they are doing fundamentally different things - they can happily co-exist.
If you want the visual effect of edit1 and the 'run' button appearing and disappearing, then simply make them invisible until called with an event attached to the 'Add Inputs' button.
Have a look at the attachment and see if that's the sort of thing you're after.
Derek.
Hi Derek,
Thanks a lot for your suggestion.
I have some uses for Modeless windows. Dmitry was kind enough to supply a script for it but it didn't work for me, or more likely I couldn't implement it correctly.
However, your suggestion is valuable to me. It'll go in my Rough Guide to MVD help file.
I have updated modeles window project with an example usage info on forms.
Hi Adam,
Following on from your previous posts about putting the contents of a text file into a memo field and now your latest post about wanting to give the user more detailed instruction when filling in a form, you can always link a help text file to specific fields - so the effect is leading them, step by step, through the form.
Attached is a way I've done it in a couple of applications (but there are many different ways of achieving similar effects).
Also, and apologies if you know this already, you can also add 'hints' to any object; if your 'help message' is brief, this is the quickest and easiest way to add instructions (in the attached example, if you hover the mouse over any of the input fields, you'll see how it works).
Hope this helps,
Derek.
Hi Derek,
Many thanks for another great lesson. This one went in my Rough Guide to MVD help file too, of course credited to you.
Your previous help on displaying text file in a memo was great. I'm using it for displaying license text on about window.
For modeless window context help was just an simple example. I have different uses in mind, such as adding / editing a record on modeless window and viewing saved records on another window while both are accessible (one at a time). This may create further complications in respect of refreshing windows but it may also be overcome with you guys help.
My Visual Database → General → Modeless window
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi