51

(5 replies, posted in General)

Hello Sabine, Hello Derek (How are you ?)

In the same genre, I did like this (a long time ago).
But Derek's method is faster.:

This is my snippet :
procedure frm_Saisie_Image6_OnClick (Sender: TObject);   //  On affiche le mot de passe en clair
begin
    frm_Saisie.Image5.Visible     := False;
    frm_Saisie.Image6.Visible     := True;
    frm_Saisie.Image6.Left        := frm_Saisie.Image5.Left;
    frm_Saisie.Image6.Top         := frm_Saisie.Image5.Top;
    frm_Saisie.Edit4.PasswordChar := #0;
    frm_Saisie.Image5.Visible     := True;
    frm_Saisie.Image6.Visible     := False;
end;

procedure frm_Saisie_Image5_OnClick (Sender: TObject);    //  On masque le mot de passe
begin
     frm_Saisie.Image5.Visible := False;
     frm_Saisie.Image6.Visible := True;
     frm_Saisie.Edit4.PasswordChar := '*';
end;

procedure frm_Saisie_OnShow (Sender: TObject; Action: string);
begin
      frm_Saisie.Image5.Visible  := False;
      frm_Saisie.Image6.Visible  := True;
      frm_Saisie.Image5.Left     := frm_Saisie.Image6.Left;
      frm_Saisie.Image5.Top      := frm_Saisie.Image6.Top;
      frm_Saisie.Edit1.SetFocus;
end;
See attachment

JB

Hello sidhillsaid

Loading and reading a video from OpenDialog :

var  WMP: TWindowsMediaPlayer;


procedure frmVideo_OnShow (Sender: TObject; Action: string);
begin
    WMP:= TWindowsMediaPlayer.Create(frmVideo);
    With WMP do
    begin
        TabOrder:= 1;
        Align:= alclient;
        Parent:= frmVideo.Panel1;
        Visible:= true;
     end;

    WMP.set_volume(100);
    WMP.stretchToFit:= 1;                                 // stretch video
    WMP.enableContextMenu:= 1;
    WMP.uiMode:= 'full';
end;

procedure frmVideo_OnClose (Sender: TObject; Action: string);
begin
    WMP.Stop;
    WMP.Free;
end;

procedure frmVideo_Button1_OnClick (Sender: TObject; var Cancel: boolean);
var    OpenDialog: TOpenDialog;
begin
    OpenDialog := TOpenDialog.Create(Form1);
    if OpenDialog.Execute then WMP.URL := OpenDialog.FileName;
    OpenDialog.Free;
end;

JB

53

(8 replies, posted in General)

Hello pozidis

The check mark allows you to visually select the lines of a grid on which you want to apply an action (move, delete, edit on a state, etc.).

It does the same job as the Multi-Select option but without its visual aspect.
JB

54

(3 replies, posted in General)

Hello Foevil

Systematically occurs when you handle more items than you have available (for example, you work with more columns in a grid than it contains or more items than a ComboBox contains) .
Check the loops that manipulate these objects.
For example: Form1.Tablegrid1.Columns[9].Width := 50; while your grid only contains 8 columns
J.B.

55

(15 replies, posted in General)

Hello Anakin

As you have the source code, you can translate it from French into your own language yourself with Google Translate.
If you have any problems, come back to me.
it's a very old program that I had to do with version 2 of MVD.
Since then I have completely rewritten it, improved the code and the interface.
You can even greatly reduce the code from too many instructions because at this time the Object Inspector had much fewer options.
At your disposal
J.B.

56

(7 replies, posted in General)

Many thanks Derek
It does the job
I immediately placed this tip with the screenshots in my snippets (made with MVD).
It is true that the FastReport documentation that I consulted is not very talkative on this subject.
thanks again
Sincerely
J.B.

57

(7 replies, posted in General)

Hello K245, Derek, Sparrow

K245 : Thanks for your help.I'm about to send you a new set of French translations.

Derek : I created the report using the Report action. The result is perfect, but intermittently the balance display is fanciful. The rounding goes wrong then returns to normal (see attachment).
So, I tried to create this report with the Report SQL action to see what it would do. Not better. So I come back to Report.

Sparrow : Thank you for your response. I had never used a calculated field in a report. Your answer and that of K245 enlightened me.

Thank you to all of you
J.B.

58

(7 replies, posted in General)

Hello to all

In my family banking management project, I continue by coding a report (via ReportSQL). To do this, I use code from Derek used in another of his projects.
I have two questions ;
1 - How should we code the use of a cacculated field (here cftbalance) in a report ?
2 - What is the use of adding AS “transactions.date” and others. at the end of each  ?
If I remove it, there is no impact in my error message.

Here is this piece of code in which I include a calculated field. This bug (apparently a problem with misplaced parenthesis):

SELECT

strftime('%d/%m/%y',transactions.tdate) AS "transactions.date",
transactions.tdesc AS "transactions.tdesc",
type.ttype AS "type.ttype",
imputations.Imputation AS "imputations.imputation",
transactions.tpaidout AS "transactions.tpaidout",
transactions.tpaidin AS "transactions.tpaidin",
total(t.tpaidin) - total(t.tpaidout) from transactions t, accounts a where (t.tdate <= transactions.tdate) and t.id_accounts = a.id and transactions.id_accounts = a.id)) AS " transactions.cftbalance"
   
from transactions

Left outer join type on transactions.id = type.id_transactions
Left outer join imputations On transactions.id = imputations.id_transactions

Thank you in advance for your responses.

J.B.

59

(10 replies, posted in General)

Hello jrga, Hello K245

A possible explanation: Does your database include images?
If so, how do you integrate them: Directly in the database (via StoreFile) or in a dedicated folder (via LinkFile and CopyTo\MyFolder)?

In the first case, the more images you store directly, the more your database will take on weight and therefore take time to load.
In the second case, your database will only be enriched by the path to store your images in their chosen folder.

Alternatively, you could use the couple BeginUpdate and EndUpdate.
J.B.

For K245

Are you still interested in my French translation of your files?

JB

60

(2 replies, posted in General)

Bonjour Destiny, Привет К245

Sur le lien donné par K245, sur la ligne de menu (Anglais) tu défiles la liste et tu cliques Français
J'ai traduit cet article cité en référence (ainsi que beaucoup d'autres).
J'en ai encore plein pour K245
Bon courage
JB

61

(5 replies, posted in General)

Hello Madbit71

A long time ago with Delphi 7, I did like this

Form1. Chart1.Series[0].Color := $FF0000; // hexadecimal value of the color

If you have several series:

  Form1. Chart1.Series[0].Color := clGreen; // Windows color name
  Form1. Chart1.Series[1].Color := clYellow;

It had worked. I would have to find my old app, but Delphi 7 and windows 10 don't go well together (you have to tweak a bit)

JB

62

(2 replies, posted in General)

hello ms2014m

On Forum page, click on Search item and enter as string " Screen resolution" and you will have your answer.

I was suggesting a little program to run from your MVD app and Derek was also suggesting a relevant splution
JB

63

(2 replies, posted in General)

Thank you Vladimir
I would never have made the connection between Border Style and hiding menus
thanks again
JB

64

(2 replies, posted in General)

Hello All

For some time I noticed a strange thing: the native menus of MVD no longer appear.
I don't use styles so form1.menu := nil; is disabled (and even absent).
The Options menu is important to me because I have several items to add to it.
To force its display, I entered: FrmOptionsdbCore.rbSettingsIniAppData.Visible := True;
I even added:
Form1.mniFile.Visible := True;
Form1.mniOptions.Visible := True;
Form1.mniAbout.Visible := True;
to wring the neck of the evil genius
Nothing works.
It's not irreparably annoying because I go behind with buttons, but still!
Do you have a beginning of explanation.
Thank you for your opinions

JB

65

(2 replies, posted in General)

Hello Jonny

Problems displaying applications with different screen resolutions are not new

K245 had responded to a post on this subject. The link I gave might be able to solve your problem.

To change the screen resolution, you can use a utility such as QRes.exe.
https://www.softpedia.com/get/Multimedi … QRes.shtml
It can be launched with the command OpenFile()

JB

66

(14 replies, posted in General)

Hello All

I found the solution to perform calculations between footers of two columns and it works:

     Recipes := Form1.TableGrid1.Columns[5].Footer.FormulaValue;
     Expenses := Form1.TableGrid1.Columns[4].Footer.FormulaValue;
     Balance := (Form1.TableGrid1.Columns[5].Footer.FormulaValue)- (Form1.TableGrid1.Columns[4].Footer.FormulaValue);
     Form1.Edit1.Text:= FloatToStr(Balance);

I declared Receipts, Expenses as a variable of type Extended.

JB

67

(14 replies, posted in General)

Hello Derek
Thank you for your help regarding PieChart.
By tweaking (hardly) the code proposed by Sparrow, I finally managed to get what I wanted.
But your code is much faster and more efficient.
You're right, you might as well display the pie chart directly on the main Form, I removed the form dedicated to displaying the pie chart, this lightens the overall code.
Thank you again for your helpful help.
J.B.
By the way, a piece of information: can we do operations between footer caption (example paid in - paidout) or do we have to go through a calculated field? I tried but I get format errors with FormulaValue.

68

(14 replies, posted in General)

Hello Sparrow
Thank you for the speed of your answer.
Tell me, do you ever sleep?
Impeccable your two codes (DateTimepicker and Form1.OnShow).
I had to struggle to fix the syntax errors because of parity quotes. It's good now.
When I implement in the general script, I have an error message: "Access violation" with the abstruse messages of Windows (Error in the module ...) implied 'Make your own way to find the place'.
Do you have an example of integration (Form1.OnShow for example). On my side I will search while using a code from Derek to display the pie chart.
Thanks again for your help.
Cordially
J.B.

69

(14 replies, posted in General)

Hello Sparrow, thanks for your interest.
You're right:
Napoleon said: "a good sketch is better than a long speech".
Hope this will help you.
Please find in attachment what I'm looking for (using a pie chart).
I began to find a clue with a Select Distinct ... but I'm not very satisfied.
Perhaps that with a new eye... I'am using MVD 6.6.

PS: For those who would like to use this code, don't forget to quote Derek who helped me a lot on this project.

JB

70

(14 replies, posted in General)

Hello all
I just finished an app to manage my family bank accounts from a project by Derek (Thanks again Derek). It works perfectly. I was suggested to add a PieChart (which I had not considered). The suggestion proposes to distribute in this pie chart to count the occupancy rate by category (eg Food -> 60, Leisure -> 20, Petrol ->15 years so on), count the number of times each category appears in an account.
These categories are stored in an Imputations table (Imputations and Qty fields), Qty being the result to obtain to populate the pie chart.
I was again inspired by an example of Derek (PieChart) to move forward. But I'm stuck getting this total by category and displaying it in a TableGrid(There are 15 in total) (See Example file).
Thank you in advance for your help.
JB

71

(10 replies, posted in General)

Thank you Destiny
I've seen your examples before but they don't match my problem.
Derek
As usual, this is the solution. It's perfect.
For your correction, it answers a question I was asking myself:
maybe the balance formatting required a floating point and
I was about to let you know.
But your answer preceded my question.
Thank you very much again
Cordially
JB

72

(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

73

(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

74

(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

75

(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