Igor, Derek

As Derek suggests, you can create an account on, for example, Dropbox (free up to a certain file size, but 5 MB should be enough) and you communicate the generated sharing link.

JB

Hello Igor, Hello Derek

In the zip file, you remove the exe file, the sql3.dll file and in the Script folder, the dcu file.
And it should pass.
JB

3

(7 replies, posted in General)

Hello Derek, Hello Vladimir
Thanks for your answers.
Derek :
I was so obsessed with this error message and what it was hiding that I forgot that the TEdit in question had an activity (OnChange) and that it prevented the field from being reset.
Thanks again.
JB

4

(7 replies, posted in General)

Hello Vladimir, Hello Sparrow

All my excuses !
it should be better like this
Thanks
JB

5

(7 replies, posted in General)

Hello Vladimir

What do you mean by 'empty'?
When I click on Conversion.zip I see
all the files
Is this what you are talking about?
J.B.

6

(7 replies, posted in General)

Hello everyone

At the request of a model railway club, I created an application with MVD which carries out a bunch of various conversions allowing the creation of a network as accurately as possible.
I am submitting to you an anomaly that is bothering me.
It is located on tab 3 of the PageControl
(called 'Calculation of a slope')
On each of the tabs all the calculations are done correctly and conform to reality.
On each tab, I placed an image ('Reset') which empties all the fields to make a new entry.
On tabs 1 and 2, the event behind the image does what is expected of it: the fields are emptied without error.
The anomaly is on the third tab.
When I want to empty the fields, an exception arises which never fails to question me with its message:
'Invalid floating point operation'.
What is the relationship between a calculation operation and a simple
resetting a TEdit (in this case TEdit10, I set the field empty), something which poses no problem on the other tabs?
The information found on the Internet leaves me perplexed as it goes in all directions.
I'll turn to you if you have an idea.
(Ultimately I say to myself: is it still the multiplication by 100 which would be at the origin? The relationship with putting the content of a TEdit clear?)
Thanks in advance.
J.B.

Hello Igor, Hello Derek

Igor
About your screen resoution, you could read this Derek's post.
Please click this link :

https://myvisualdatabase.com/forum/view … hp?id=8576

et go to Derek's post.
This can be a clue.

JB

Hello Igor, Derek

Above all, we must not abandon the idea of using scripts, it is one of the strengths of MVD which allows you to enter through the window when the door is blocked.
A script will very often make it possible to overcome the shortcomings of native MVD because not all the functions have been implemented by Dmitri (the creator of MVD).
In my projects created with MVD, I make great use of scripts to obtain results that the MVD interface alone does not allow.
On the very active forum, you will almost every time get the answer by script to a specific problem, there is always someone to offer a solution (Derek, Sparrow, K245 to name a few).
Good luck in using them.
JB

9

(1 replies, posted in General)

Hello abdulraheem

You cannot modify the image of a button as is. In this matter, Windows remains the boss. But you can use this tip suggested some time ago by Derek and it works well. : Call this link :

https://myvisualdatabase.com/forum/view … hp?id=5909

JB

10

(5 replies, posted in Database applications)

Hello Sparrow

Thanks for this disk management project.
I added a piece of code from Derek to colorize the artists and their albums:

procedure Form1_TreeView1_OnChange(Sender: TObject);
var vi: integer;
begin
   Form1.TreeView1.Columns[1].Visible := false;
   for vi := 0 to form1.treeview1.RowCount-1 do
     begin
       if Form1.Treeview1.Cells[1,vi] < '1' then Form1.Treeview1.Cell[0,vi].TextColor := clRed;
       if Form1.Treeview1.Cells[1,vi] = '1' then Form1.Treeview1.Cell[0,vi].TextColor := clBlue;
       if Form1.Treeview1.Cells[1,vi] < '1' then Form1.Treeview1.Cell[0,vi].FontStyle := fsBold;
       if Form1.Treeview1.Cells[1,vi] = '1' then Form1.Treeview1.Cell[0,vi].FontStyle := fsBold;
     end;
     Form1.TreeView1.Columns[0].Footer.Caption := SQLExecute('Select Count(distinct ParentID) from Musicians');
     Form1.TreeView1.Columns[0].Footer.Color := $002C8BBA;
end;

As part of managing my classical music records, I am going to add a few additional combo boxes
(Name of performer, director, soloists, etc.).
To be continued :
Creation of a grid grouping all these items to carry out more comprehensive searches, individual or global states,
different types of import-export, pies....
Finally, possibility of retrieving information from the Internet (but this is not a given). I had tried in another project, but
too many error messages and HTTP is difficult to handle.
But I'm still going to try.
Cordially
JB

Hello Sparrow
Your improvements to the original project are superb.
And Cherry on the cake your Drag and Drop function.
I always fumbled to integrate it into my applications, it worked but through tortuous paths. Your job is a highway compared to my way of doing things.
Do you know why using a classic DBimage with a save button (classic in MVD) did not work in this project?
I have always used it in all my other projects, but there, nothing was ever displayed whereas in the \Covers folder (intended to store the cover images), their names appear, proof that the Save button was working. job ?
Thank you again for your involvement and to Derek too)
Sincerely
J.B.

Hello Sparrow

Based on your excellent project, I tried to add an additional object: the album cover.
In the Alb-Info table, I therefore created an Image field called Covers.
When in the OnExit procedure which saves all the entries, I implement this code:

if (Sender is TdbImage) and (TdbImage(Sender).TagString <> StrToMD5(TdbImage(Sender).Picture))
   then
   begin
     if SQLExecute('SELECT count(id) FROM "'+TdbImage(Sender).dbTable+'" WHERE id_musicians = '+Form1.TreeView1.sqlValue) = '0' then
       SQLExecute('INSERT INTO "'+TdbImage(Sender).dbTable+'" (id_musicians) VALUES('+Form1.TreeView1.sqlValue+')');
       SQLExecute('UPDATE "'+TdbImage(Sender).dbTable+'" SET "'+TdbImage(Sender).dbField+'" = '+TdbImage(Sender).sqlValue+' WHERE id_musicians = '+Form1.TreeView1.sqlValue);
       Form1.Label7.Visible := true;
       TdbImage(Sender).Tag := 0;
       TdbImage(Sender).TagString := '';
       Timer(1000);
   end;

I get an incompatibility message between String and Picture.
I guesse this problème stands here : StrToMD5(TdbImage(Sender).Picture))
There is no way to resolve this anomaly. I ask for your help
How convert String and Picture ?
thanks in advance
Sincerely
J.B.

Hello Derek

It took me a while (a few years) to acquire these CDs.
But I'll probably put less into capturing them in the project.
Between 15 and 20 a day will eventually do it.
J.B.

TCotton:

I simply ask Mr Google: 'icon Find' or 'icon Research', 'icon Spreadsheet' and so on and I choose the one that seems most elegant to me.

Derek:

I'm going to use your example to enter my entire blues collection (nearly 500 CDs). Simply TreeView with performers, tracks and album art. No need for more. Thanks again.

Sparrow:

A nice little addition to Derek's example and all on one form.
I added this instruction to sort the artists alphabetically:
begin
    form1.menu := nil;
    Form1.TreeView1.dbCustomOrderBy := 'ParentID, mname';            // Form1 TV sorting
end.

J.B.

Hello Derek, Hello franklabre

I created several projects with the MVD TreeView component (between us, it's not great, the Delphi 7 one is better, but it has the merit of existing).
The documentation concerning the TreeView is very brief and as Derek says, it is on the forum that you will find a lot of information on this subject.
Take a close look at what we can do with TV (here my library) and which would be in line with what you want to achieve.
Good luck
JB

16

(4 replies, posted in General)

Hello Derek
Perfect code that does the job exactly.
Before the Excel sheet appears, I will place a SaveDialog
allowing the user to enter the folder of their choice (although they can do so from the Excel menus (Open -> Save As...).
But as people like to be served dishes without having to go to the buffet...
Very nice your answer
Sincerely
J.B.

17

(1 replies, posted in General)

HI

Give us more details or an illustration about what you want.
Or the code which opens a second form.

What is the goal of thoses pictures ?
Are they on button or in Timage ?

JB

18

(4 replies, posted in General)

Hello Sparrow

Thank you for your answer.
In fact, I was using the Round function, but I was applying it to the wrong column which was already in the right format.
But you opened my eyes.
Another question independent of this one, if I may ask you again.
I have a TableGrid with CheckBox and with Multiselect option.
Is it possible to select several rows and save these rows in a text file?
In order to purify this grid of lines which have become obsolete.
Thanks in advance
Sincerely
J.B.

19

(4 replies, posted in General)

In a project made with MVD 6.1, I see strange behavior. (See illustration in attachment).
The column concerned is the result of a calculated field (Type Currency).
For certain values, the display is correct (ie 10113.58), for others there are too many digits after the decimal places (ie 96931.229999999).
I had the same display problem but in a report. A tip from Derek had saved my day and fixed the problem.
This time it doesn't work.
On the other hand, the value of the footer of this column is displayed correctly.

Here is the part of the code that applies to this column:

Recipes := Form1.TableGrid1.Columns[5].Footer.FormulaValue;
Expenses := Form1.TableGrid1.Columns[4].Footer.FormulaValue;
Balance := (Form1.TableGrid1.Columns[6].Footer.FormulaValue)- (Form1.TableGrid1.Columns[5].Footer.FormulaValue);
Form1.Edit1.Text:= FormatFloat('00.00',Balance)+ ' €';
Form1.TableGrid1.Columns[7].Footer.Caption := FormatFloat('00.00',Balance).

Thank you if anyone can resolve this anomaly which must be insignificant.
Thanks in advance.

JB

20

(4 replies, posted in General)

Hello Domebil

Look at this :

procedure Form1_TableGrid1_OnChange (Sender: string);
begin
     Form1.TableGrid1.Columns[0].Alignment := taRightJustify;         // First Column
     Form1.TableGrid1.Columns[1].Alignment := taCenter;
     Form1.TableGrid1.Columns[2].Alignment := taLeftJustify;
end;

You could also use BiDiMode from Object Inspector (behind Aditionnal)

Make your choice.
JB

21

(6 replies, posted in Script)

Hello Derek

Hello Derek,
You're right, any (or all) of the suggestions may suit Vickus's needs.
It is the strength of MVD to allow this.
Best wishes to you and your family for 2024.
Same for all MVD users.
J.B.

22

(6 replies, posted in Script)

Oops, I made a mistake in my copy and paste. This is what I wanted to copy:

procedure Form1_Edit1_OnExit (Sender: string);
begin
    Form1.Edit1.Text[1] := UpperCase(Form1.Edit1.Text[1]);
end;

Sorry Derek !

JB

23

(6 replies, posted in Script)

Hello Vickus, Hello Derek

You also have this code, but less pretty than Derek's :

procedure Form1_Edit1_OnChange (Sender: TObject);
begin
     if length(form1.edit1.text) = 1 then form1.edit1.text := namecase(form1.edit1.text);
        form1.edit1.selstart := length(form1.edit1.text);
end;

JB

24

(7 replies, posted in General)

Thanks Destiny, Hello Derek
Merry Christmas to you and best wishes for 2024.
Destiny, at your disposal according to my possibilities.
What is the weather in my country?
J.B.

25

(5 replies, posted in Russian)

Hello6katran7

Without further details on the aim of your project and without a script (or excerpt from a script) which could guide us, or even an illustration of what you want to produce, and without any idea of what could block you in the construction of your project , it will be extremely difficult to help you.
Even if you go through a PM to find a developer who can help you as K245 rightly suggests.
JB