Topic: "Limited version" display

Hello everyone, I have a problem displaying the message "Limited version.
I would like this reminder to appear when starting my software but it hangs with my main screen which is the one for using the program. However, I tried to put it just behind "Scrip" but nothing helped.
Can you help me?

2 (edited by derek 2021-05-23 20:47:38)

Re: "Limited version" display

Hello,
Welcome to the Forum.
There's a number of ways of doing this.  In the attachment are two of the options:
Option 1 is a simple message that requires the user to click through it before accessing your program.
Option 2 uses a 'splash screen' with a timer and a couple of beeps to alert the user (both of which are configurable in the script).
You could also use an image for your reminder instead of a simple text label - it all depends on how far you want to take it.
Hope this helps,
Derek.

Post's attachments

Attachment icon sdpc62.zip 681.66 kb, 372 downloads since 2021-05-23 

Re: "Limited version" display

I thank Mr. Derek for the time he took to answer me.
The code he provided works perfectly, it's great.
Mr. Derek is a pro.

Sabine

Re: "Limited version" display

Hello, I would like the "Formsplash" splash screen to open my working window, so the main screen, what can I do?

Re: "Limited version" display

Hi,
Not sure I quite understand what you want.  Can you explain it in more detail - perhaps attach your project or a couple of screenshots?
Derek.

Re: "Limited version" display

RE: when "Formplash" closes I would like the working window to open, ie open the main tab in order to start working.
For the moment "Fromplash" is closed and then nothing opens so the software does not start.

Re: "Limited version" display

Can you attach your project (as a zip file without the .exe) and I'm sure someone will be able to fix it for you.
Derek.

Re: "Limited version" display

How do I send it to you

9 (edited by derek 2021-05-26 14:44:23)

Re: "Limited version" display

Hi,
Zip the folder that contains your project (delete the .exe file first).
Then attach it to your message by 1. choosing  the zip file,  2.  adding it   and  3.  submitting your reply (see the attached screenshot).
I suspect what has happened is that you have positioned your splashscreen form immediately after the 'Database Tables' and 'Script' tabs in the development window, rather than Form1 (the form you first want to starting working with must always be the left-most form).
But attach your project and someone can check it for you.
Derek.

Post's attachments

Attachment icon screenshot.jpg 118.38 kb, 98 downloads since 2021-05-26 

10 (edited by sdpc62 2021-05-26 15:42:49)

Re: "Limited version" display

I cannot send you the program, I have lightened it as much as possible but it is still too big.

I just wanted that after displaying "Formplash" my program would start on my main screen.

     Sabine

Post's attachments

Attachment icon DSC01595.JPG 78.89 kb, 103 downloads since 2021-05-26 

Re: "Limited version" display

Hello sdpc62, Hello Derek

1 - You create a form with your splashscreen
2 - You display it for a given time with this code (To place between BEGIN... END.) :
      Before all, you have to declare this variable (first line of your script :
    Var Timer      : TTimer;   

    Timer := TTimer.Create(nil); // create timer
    Timer.OnTimer := @OnTimer;  // event procedure
    Timer.Interval := 4000; //  4 sec
    Timer.Enabled := True;  // Start timer
    Splash.ShowModal; // Show welcome screen

3 - From MVD, place immediately beside the Script tab, the form you want to see (your working window)
Then this one will be displayed after 4 seconds (Time Interval setting in the Timer)

And it will go ahead !
If any problem, as said Derek, give us your project (without exe, sql3.dll, sql.db (this one will be rebuilt)

JB

12 (edited by derek 2021-05-26 18:43:44)

Re: "Limited version" display

Hi Sabine, Hi Jean,
In addition to attaching the code to call the 'splash screen' when you click form1.button1, you also have a 'close form' action associated with it (see the attached screenshot)..
Therefore, you click on form1.button1, it runs the script to display the 'splash screen', it closes the 'splash screen' and returns to form1 and then form1 is closed and the program terminates.
Form1.button1 should be defined as 'No Action'.
Derek.

Post's attachments

Attachment icon sabine.jpg 113.28 kb, 93 downloads since 2021-05-26 

Re: "Limited version" display

Hello Sabine, Hello Derek

Merci pour ton code.
Quelques points à son sujet :

C'est une convention dans la programmation du langage Pascal (utilisé par MVD), on déclare toujours les constantes en début de script, en toutes premières lignes (mais cela ne gène pas le déroulement du programme).

En l'état, quand tu affiches l'écran FormSplash, à la fin du sommeil (Sleep), tu n'indiques pas l'action suivante, à savoir afficher l'écran de travail (Timbre de France)

En l'état, quand tu affiches l'écran FormSplash, à la fin du sommeil (Sleep), tu n'indiques pas l'action suivante, à savoir afficher l'écran de travail (TimbredeFrance). L'écran d'accueil se ferme après les 2 secondes de sommeil indiqué, mais il n'y a pas de suite. Modifie ton code comme suit :

procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
begin
    formsplash.show;
    application.processmessages;
    sleep(2000);
    formsplash.close;
    TimbredeFrance.ShowModal; // ***********  a rajouter
end;

L'instruction ShowModal signifie que cet écran ne pourra se fermer qu'avec une action de l'utitisateur (Close ou Save)

Si tu distribues ton programme avec une clé d'enregistrement, ne donnes pas le code en clair, les trois clés que tu proposes sont trop évidentes. Et encore, même si ce code sera compilé, il est très facile avec un éditeur hexadécimal de retrouver les clés.

Reviens vers nous si tu rencontres des problèmes (Derek est meilleur que moi sur ce point)

Thank for your code.
Some things about it :

It is a convention in the programming of the Pascal language (used by MVD), we always declare the constants at the beginning of the script, in the very first lines (but this does not interfere with the progress of the program).

As it stands, when you display the FormSplash screen, at the end of sleep (Sleep), you do not indicate the following action, namely display the working screen (TimbredeFrance). The home screen closes after the 2 seconds of sleep indicated, but there is no follow-up. Change your code as follows:

procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
begin
    formsplash.show;
    application.processmessages;
    sleep(2000);
    formsplash.close;
    TimbredeFrance.ShowModal; // ***********  a rajouter
end;

The ShowModal instruction means that this screen can only be closed with an action from the user (Close or Save)

If you distribute your program with a registration key, do not give the code in the clear, the three keys you offer are too obvious. And again, even if this code will be compiled, it is very easy with a hexadecimal editor to find the keys.

Come back to us if you have any problems (Derek is better than me at this point)

Good Luck

JB

Re: "Limited version" display

Hello Derek, hello Jean, the procedure you gave me works correctly, my working window opens but the form1 screen remains displayed at the same time as the working one.
How to close it?
Thanks to you two

Sabine

Re: "Limited version" display

Hello sdpc2

Clarifions ce que tu veux afficher.
Quelle form doit s'afficher dès le lancement de ton projet ?
- Form1 (quel est son rôle ?)
- ou FormSplash (qui est plus logique)

Dans ce cas :
- Supprime Form1 (dont je ne vois pas l'utilité)
- Transfère le bouton (et son action) de Form1 vers FormSplash)

Déjà ton script présente un problème (Form1.Button1.OnClick).
Tu ffiches la form TimbresdeFrance avant de refermer Form1.
Comme TimbresdeFrance est en mode Modal (action obligatoire de l'utilisateur), rien ne se passera pour Form1.

Dans ce cas, ferme Form1 avant d'afficher TimbresdeFrance (donc inverse les instructions) :

procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
begin
    formsplash.show;
    application.processmessages;
    sleep(2000);
    formsplash.close;
    form1.close;
    TimbredeFrance.ShowModal;
end;

N'oublie pas également ce que je t'avais déjà répondu :
Déclares toutes les constances dès le début du script, on gagnera en lisibilité (en plus c'est une convention)

Reviens vers nous si tu rencontre d'autres problèmes
JB

Let's clarify what you want to display.
What form should be displayed upon launching your project?
- Form1 (what is its role?)
- or FormSplash (which makes more sense)

In that case :
- Delete Form1 (which I do not see the use of)
- Transfer the button (and its action) from Form1 to FormSplash)

Already your script has a problem (Form1.Button1.OnClick).
You fill in the TimbresdeFrance form before closing Form1.
As TimbresdeFrance is in Modal mode (mandatory user action), nothing will happen for Form1.

In this case, close Form1 before displaying TimbresdeFrance (therefore reverse the instructions):

procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
begin
    formsplash.show;
    application.processmessages;
    sleep (2000);
    formsplash.close;
    form1.close;
    TimbredeFrance.ShowModal;
end;

Do not forget also what I had already answered you:
Declare all the constancies from the beginning of the script, we will gain in readability (in addition it is a convention)

Come back to us if you have other problems
JB

16 (edited by sdpc62 2021-06-10 17:18:15)

Re: "Limited version" display

Hello, I succeeded with your help in doing what I wanted.
Now I would like to know if it is possible to encrypt the keys that are displayed in my code not to see them because I would like to terminate my program.
Thank you

Bonjour, j'ai réussi avec votre aide à faire ce que je voulais.
Maintenant je voudrais savoir s'il est possible de crypter les clés qui sont affichées dans mon code pour ne pas les voir car je voudrais terminer mon programme.
Merci

Sabine

Re: "Limited version" display

sdpc62,
First of all you do not need to distribute the .vdb file to your users and you do not need to distribute the script.pas file in your script folder. You still need these files for development purposes. So you should copy your application folder and remove these files before distributing your application to your users. That should be enough, however, you can embed and hide the remaining files and folders inside the .exe file by using a software tool such as Enigma Virtual Box. It's free and easy to setup for your programs.

Re: "Limited version" display

Hello, thank you for your answer which I will apply.
I wish you a good weekend.
  Sabine

19 (edited by sdpc62 2021-07-01 12:11:43)

Re: "Limited version" display

Hello, I would like to know how to fix a window on the screen with the impossibility of moving it.

Bonjour, j'aimerais savoir comment fixer une fenêtre sur l'écran avec l'impossibilité de la déplacer.

Sabine

20 (edited by derek 2021-07-01 13:19:17)

Re: "Limited version" display

Hi,
The easiest way is probably to set the relevant form's borderstyle = bsnone.
You could also add an image of a windows action bar so that the form is visually consistent with other windows in your program but it's optional and purely cosmetic.
I've done it for Form2 in the example but you could do it for whatever form(s) you want.
Derek.

Post's attachments

Attachment icon sabine fixed window.zip 348.91 kb, 272 downloads since 2021-07-01 

Re: "Limited version" display

Thanks Derek, that's exactly what I wanted to do, great.

Merci Derek, c'est exactement ce que je voulais faire, super.

Sabine

Re: "Limited version" display

Hello, can you tell me in which file the database data is written because I would like to save this file in order to protect my entries.

Bonjour, pouvez-vous me dire dans quel fichier s'inscrivent les données de la base car je voudrais faire la sauvegarde de ce fichier.

Sabine

Re: "Limited version" display

Hi,
All of your data is written to a file called sqlite.db.
In it, are all of the tables you have defined in your application and the data contained in each of those tables.
There are a couple of free programs you can use to examine the contents of sqlite.db;  the one I use is sqlitestudio. 
Using a product like sqlitestudio is extremely useful both if you have a specific problem with your program and just generally to help understand how MVD creates and stores your data.
There are examples in the forum to show how to make backups - these can either be a backup of a) your complete application or b) just the data (sqlite.db) and are typically done either by script or by calling a batch file (*.bat)..
No one way is better than another, it really depends on what you want to achieve.
Derek.

Re: "Limited version" display

Hello, a small simple question, is it possible to put arrows to indicate directions but especially can we tilt them.

Post's attachments

Attachment icon Flèches.jpg 3.32 kb, 83 downloads since 2021-09-10 

25 (edited by derek 2021-09-11 14:20:36)

Re: "Limited version" display

Hi Sdpc62,
MVD doesn't support that sort of graphic directly.
But it's possible to use an image of an arrow and get the same effect (if using images for this sort of purpose, I find it better to choose a .png with transparency).
And just like any other object, the image can have an associated action (for a simple example, see the attached - click on the tablegrid, then the arrow etc etc).  A more practical use is if you are trying to help the user navigate through a form, or series of forms.
Derek.

Post's attachments

Attachment icon arrows.zip 527.25 kb, 236 downloads since 2021-09-11