76

(10 replies, posted in General)

Hello everyone
I am in the process of carrying out at the request of a friend, a personal account management program. Everything is fine until I stumble on the calculation of the balance (less during a debit, more during a credit).
It seems to me that Derek had made this type of calculation using a calculated field (with a debit CASE and a credit CASE), but no way to find it.
Does anyone have a solution to get the balance for each transaction ?
thanks in advance

Please find in the attachment what I need.

JB

77

(2 replies, posted in General)

Salut Nikomax
As-tu essayé de tirer la poignée du MasterData vers le bas pour augmenter la visibilité ?
JB

78

(7 replies, posted in General)

Hello Derek, Reteinformatica

Attention, all the possible and imaginable messages that you could find have not been integrated into MVD and therefore for some, you will not be able to apply a translation.
JB

79

(1 replies, posted in General)

Hello Nikomax

Tu as àa :

procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
begin                                                                                                       // mbYes is 6 - mbNo is 7 - mbCancel is 2
   If 7 = MessageDlg('Vous voulez quitter l''application ?', mtConfirmation, mbYes + mbNo, 0) then
      Cancel := True;
end;

ou ça :

On confirme par des messages avec "Oui" ou Non"

Function Confirm(msg: String; ICON: Integer=MB_ICONQUESTION; title:String='Confirm'): boolean;
begin
    Result := IDYES = MessageBox(msg, 'Nom application : '+title, MB_YESNO+ICON);
end;

Comment l'utiliser :

if Confirm('Bien certain ?') then begin
    ShowMessage('OK');
end else
begin
   ShowMessage('Cancel');
end;

JB

80

(5 replies, posted in General)

Hello Derek, AD1408

I use this snippet ;

procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
begin
   Form1.PageControl1.Pages[0].Caption := 'New Name';
end;

The same way for others TabsSheets
JB

81

(35 replies, posted in General)

Hello madbit71

It is true that many MVD users regret that MVD is no longer developed. Dmitri, its creator, left on other tracks (Web, Python) and it would be surprising if he returned to MVD. But we can always dream of it.
As alternatives you have (I only mention the free ones): Symphytum, Limnor Studio, NSBase.
So, for me, I went back to Lazarus.
JB

82

(7 replies, posted in Script)

Hello amsjunior1
Put an space between Try and StrToInt or better
Try
StrToInt(xxx)

JB

83

(20 replies, posted in General)

Hello m.alin

Try this

Translate('Yes', 'Ja');
    Translate('No', 'Nein');
    Translate('None', 'None');
    Translate('Skip', 'Skip');
    Translate('Close', 'Close');
    Translate('Cancel', 'Cancel');

JB

84

(27 replies, posted in General)

Hello reteinformatica, Hello Derek

Not all messages appearing in MVD are translatable because Dmitri did not type them all.
You would have to come across this message close to the one you can't translate for it to work:
Translate('This_Field_is_required', 'your translation');

JB

85

(5 replies, posted in General)

Hello Sparrow

Sorry to answer now, I saw too late
that your response followed Derek's.
You are right the structure of the text in the RichEdit is badly done.
I will rewrite this program taking Derek's idea into account.
Also, with its feature, there will be less code to write.
Thank you for your interest and good luck, keep it up!
J.B.

86

(5 replies, posted in General)

Hello Derek, how are you ?

It Works and well !
Sacred idea the TextRTF function !
Thanks again, you're a boss
JB

87

(5 replies, posted in General)

Hello all

I am having fun creating a program with MVD to manage all the snippets published in the forum.
I use a Treeview and an RTF component.
Everything works fine, the ascending sort in the TV is OK, but when the RichEdit displays the text associated with a TV item, the display is not good. (see picture example)
The text in the RichEdit is not identical to that entered during creation.
When creating the text, after each instruction terminated by a semicolon, there is the equivalent of a line break.
In the final result, all the lines are one after the other.
Is there a statement to add to force formatting? I couldn't find anything in the Object Inspector to do this.
Thank you for your help.

JB

88

(22 replies, posted in General)

Hello sdpc

What do you mean by symbol? An image, an icon, a message?
You can use a MessageBox with its appropriate icon, create your own message box.
Give us more clarification

JB

89

(2 replies, posted in General)

Hello Vladimir

Well seen Vladimir!
What took me to sort on a number of records?
It was on the name of the author that it had to be done.
I changed this sort parameter to: 'ParentID2, Name' and everything is back to normal.
Thanks again Vladimir
J.B.

90

(2 replies, posted in General)

Hello everyone and best wishes for 2023
I tried to use the Treeview integrated in MVD (Not great, the Delphi one is easier to use)
My problem is getting alphabetical sorting once I enter a new author (my MVD example is library management).

To force this automatic sorting, I use this instruction in the script (between Begin and End.):
Form1.TreeView2.dbCustomOrderBy := 'ParentID2, record_count';
Nothing works, the last author entered remains at the end of the list (see image).
The worst part is that it worked before.
Would you have an explanation?
Thanks for your help.
J.B.

To you too Vladimir and to all MVD users

JB

92

(7 replies, posted in Talks about all)

Hello Hichame, hello Brian

Brian is right. Among other things, Dmitry had purchased the NextDBGrid license from Bergsoft. Just it is already worth 109 €. And there are surely others which make it possible to have an indispensable tool with MVD. Also, MVD was created from Embarcadero's RAD XE3 which is also not cheap.

A good Christmas to all MVD users.

JB

93

(9 replies, posted in General)

Hello Hichame, hello Vladimir, How are you Derek ?

As Derek points out, you have to make changes to each of the components used in your project.
I've already done this for some of mine:
In any text editor, I open the forms.xml file, search (CTRL+F) for the keywords FontName and FontSize, replace them with the font and size of my choice (via Search -> Replace) . It's long and tedious, but there is no ready-made solution. but it works.
Obviously, if you replace with a font that is not present on your users' PC, you must provide it to them (TTF or other) and tell them that they must first install it on their machine.

Hoping this can help you !

JB

94

(2 replies, posted in General)

Bonjour sdpc62

Ces deux snippets valent pour installer un menu sur la form2 ou la form3.

These two snippets are valid for installing a menu on form2 or form3.
¨For what you want to do, the principle remains the same, you just have to adapt it to your needs
¨Pour ce que tu veux faire, le principe reste le même, il te suffira de l'adapter à tes besoins

Créer des menus sur une form autre que la form principale
Create menus on a form other than the main form

procedure Form1_OnShow (Sender: string; Action: string); // event OnShow
var
   MyItem1: TMenuItem;
   MyItem2: TMenuItem;
   MySubItem3: TMenuItem;

   MenuForm2: TMainMenu;
begin


   MyItem1 := TMenuItem.Create (Form2);
   MyItem1.Caption := 'MyItem1';
   MyItem1.OnClick := @MenuClick1;

   MyItem2 := TMenuItem.Create (Form2);
   MyItem2.Caption := 'MyItem2';


   MySubItem3 := TMenuItem.Create (Form2);
   MySubItem3.Caption := 'Submenu';
   MySubItem3.OnClick := @MenuClick3;



   MenuForm2 := TMainMenu.Create(Form2); // Create MainMenu on Form2
   MenuForm2.Items.Add(MyItem1);         // you can use ADD or INSERT
   MenuForm2.Items.Insert(0, MyItem2);   // you can use ADD or INSERT
   MyItem2.Add(MySubItem3);

end;


procedure MenuClick1 (Sender: string);
begin
     ShowMessage('Hello from MyItem1');
end;

procedure MenuClick3 (Sender: string);
begin
     ShowMessage('Hello from Submenu');
end;

begin

end.


Autre formule :

procedure CreateMenu;
var  MainMenu:TMainMenu;
      Item:TMenuItem;
begin
  MainMenu:=TMainMenu.Create(Form3);
  Form3.Menu := MainMenu;
  Item:=TMenuItem.Create(Form3);
  Item.Caption := 'Bingo!';
  MainMenu.Items.Add(Item);
end;

begin
   CreateMenu;
end.

Dans cet exemple, on crée le menu principal sur Form3. Cela peut être utile si le formulaire de départ est utilisé pour le formulaire de connexion.

In this example, we create the main menu on Form3. This can be useful if the starting form is used for the login form.

JB

95

(3 replies, posted in General)

Hello sdpc, Hello Sparrow

Tu souhaites ce tri pour affichage dans un état (*.fr3) ou simplement affichage visuel de la grille ?

You want this sorting for display in a report (*.fr3) or simply visual display of the grid. ?

JB

96

(3 replies, posted in General)

Hello Nikomax, hello Brian

You could try this snippet :
ShowMessage(GetHardDiskSerial('c'));

But this number will change if the installer reinstalls Windows.

JB

97

(1 replies, posted in General)

Hello Kilkindjarri

Did you download your sample file to a different folder than your project (precaution to be taken)?

If so when you launch MVD, it is possible that the application automatically launches the last loaded project.

In this case go through the MVD menu: File -> Open Project.
Then go to the folder containing your project and click on the file: 'YourProject.vdb'.

This may be an explanation for your problem.
MVD does not overwrite files contained in their own folder.
Otherwise come back to us.

J.B.

98

(2 replies, posted in General)

Hello Niko

procedure Form1_Edit1_OnDoubleClick (Sender: string);
begin
    OpenFile('mailto:'+Form1.Edit1.Text);
end;

and this

// Pas nécessaire
// Uniquement pour surligner l'adresse e-mail et changer le curseur en HandPoint

procedure Form1_Edit1_OnKeyUp (Sender: string; var Key: Word; Shift, Alt, Ctrl: boolean);
begin
    if Pos('@', Form1.Edit1.Text)>0 then
    begin
        Form1.Edit1.Cursor := crHandPoint;
        Form1.Edit1.Font.Style:=fsUnderline;
        Form1.Edit1.Font.Color := clHotLight;
    end else
    begin
        Form1.Edit1.Cursor := crDefault;
        Form1.Edit1.Font.Style:=0;
        Form1.Edit1.Font.Color := clDefault;
    end;
end;

JB

99

(5 replies, posted in General)

Salut Destiny

Si tu ne veux pas passer par une boîte de dialogue affichant les polices disponibles à partir desquelles
ton utilisateur pourra sélectionner la police de son choix, le plus est de bricoler le fichier Forms.XML de ton application comme suit :

Ouvrir le fichier forms.xml dans n’importe quel éditeur de texte et remplacer

FontName = "Tahoma" FontSize = "8"

par

FontName = "Segoe UI" FontSize = "9"


Au cas où, sauvegarder une copie du fichier forms.xml

Espérant que cela t'aidera

If you don't want to go through a dialog showing the available fonts from which
your user will be able to select the font of his choice, the most is to tinker with the Forms.XML file of your application as follows:

Open the forms.xml file in any text editor and replace

FontName="Tahoma" FontSize="8"

by

FontName="Segoe UI" FontSize="9"


Just in case, save a copy of the forms.xml file

Hope this will help you

JB

100

(1 replies, posted in General)

Salut Nikomax

Tu te nous donnes pas assez d'informations sur ta demande :
- Quel type de requêtes
- Requête ou Rapport ?
- Indiques nous la structure de ta requête

Eventuellement joins nous ton projet (sans le exe, le dcu)
Là on pourra mieux cerner la réponse à t'apporter.

JB

You don't give us enough information about your request:
- What type of requests
- Query or Report?
- Tell us the structure of your request

Eventually join us your project (without the exe, the dcu)
There we can better understand the answer to give you.

JB