1

(4 replies, posted in General)

Hi Sparrow,
It looks like a very good way to add some basic validations to various columns when using editable grids (something that I've always found a bit weak in standard MVD).
Thanks,
Derek.

2

(4 replies, posted in General)

Hi Sparrow,
Yesssss!   it works exactly how I need it to now.
I really like how you use '+form1.tablegrid1.columns[c].fieldname+' to update different fields depending on the column that you are positioned on - never seen that done before;  one to remember for future use.
Thanks as always for your help,
Derek.

3

(4 replies, posted in General)

Hello All,
I am using an editable tablegrid and the aim is to make data entry as easy as possible (see attached sample project).
The tablegrid is configured so that you use the arrow keys to enter a value in a tablegrid cell and then, again, using the arrow keys, can quickly go to the next column, the next row etc;  there is no need to actually 'click' in the relevant cell before entering a value.
If data has already been entered in tablegrid cells and you want to change these values, again, using the arrow keys, you go to the required cell and simply replace an old value (ie 2) with a new value (ie 3) again - without having to first click in the cell.
However, if you want to delete a value, you have to first click in the cell and then use the space bar (or the 'esc', or 'backspace' or 'delete') key.
So the question is why can you enter / replace one value with another without having to click in the relevant tablegrid cell but when you want to delete a value,  you first have to click in the relevant tablegrid cell?
It is not only to speed things up but also to eliminate the inconsistency.
I would appreciate any ideas that anyone might have.
Using MVD 6.5 and Windows10..
Thanks,

4

(4 replies, posted in General)

Salut les deux,
Jean, désolée d'apprendre que tu as la grippe. Il me semble que c'était une forme assez virulente cet hiver.
Attached is one option which might help you (but I don't imagine that it's too different from what you've already done yourself).
Regards,
Derek.

A Merry Christmas to all active users of MyVisualDatabase - sadly a decreasing number, but nevertheless true fans of this fantastic software.
To Dmitry, wherever he now is and I wish him much success with any new ventures.
And especially to those who have helped me with various issues throughout 2025 - still learning!
Best wishes and Peace in 2026.
Derek

6

(1 replies, posted in General)

Hi,
I'm not sure why you would want to set the tablegrid to 'enabled := false;' but if you do it that way, then you won't be able to select a row.
I think a better way to do this is to leave the tablegrid as 'enabled = true' and simply not associate any actions (other than 'show') with it (the tablegrid by default doesn't actually 'do' anything until you tell it to).  Optionally, you could also disable the tablegrid's pop-up menu to prevent any further action - see attached).
Obviously, the next question is how you plan to add or delete records but maybe you are using a different form for that.
Derek.

Это не ошибка MyVisualDatabase.
Вам не нужно (точнее, вы не можете) сохранять вычисляемые поля. В этом нет смысла, поскольку поля, определенные в вычислении вычисляемого поля, сами уже сохранены, и, следовательно, вы вносите избыточность данных (что (строго говоря) недопустимо в реляционной базе данных).
Удалите вычисляемые поля из действия «сохранить», и ошибка должна быть исправлена.
Derek.
.
Два примера, демонстрирующие, когда можно использовать вычисляемое поле.

1. Для отображения возраста человека.
У вас есть поле для «даты рождения» этого человека, и его возраст («сегодня» - «дата рождения») отображается как вычисляемое поле. Хранить его в базе данных бессмысленно, потому что уже через один день оно будет неверным.

2. Для отображения «значения» чего-либо.
У вас есть поля для «цены» и «количества» чего-либо, поэтому его «значение» («цена» * «количество») может отображаться как вычисляемое поле; хранение его «значения» в базе данных также приводит к избыточности данных.

Привет,
Если вы хотите сделать это так, как вы это задумали, вам понадобится второй фильтр в форме ohp_add (см. вложение).
Однако я думаю, что настоящий вопрос в том, почему вы делаете это таким образом. Какую информацию отображает ohp_add.tablegrid1, которую вы еще не видите в отдельных полях редактирования и т. д.
Обычный способ сделать это — переместить tablegrid1 из ohp_add в tpp_ohp_main и использовать его в качестве начального фильтра (при этом tpp_ohp_main.combobox1 вообще не нужен).
Кроме того, зачем использовать сценарий для получения записи, которая будет отображаться в ohp_add, а не стандартную функцию «Показать запись»?
Derek.

9

(3 replies, posted in General)

Hi Fmr,
You could try it like this (see attached) but there are probably other ways too.
The 'round' command by default rounds up or down depending on the value used so if it rounds down, simply add 1 to the result.
Regards,
Derek.

10

(6 replies, posted in General)

Hi,
The syntax to keep a form 'on top' is:

procedure Form1_OnShow (Sender: TObject; Action: string);            //** set 'stay on top'
begin
  form1.formstyle := fsstayontop;
end;

However, this is typically used more to keep your entire application on top of other programs that might be running.
Regards,
Derek.

11

(16 replies, posted in General)

Hi FMR, Jean, Sparrow,
Fixed a couple of things - think it should be okay now.
Everything tested against https://www.timeanddate.com/date/duration.html to check for accuracy.
Any problems, please let me know.
Derek.

12

(16 replies, posted in General)

Hi FMR, Salut Jean (ça va ?),
I think you might have some problems with your project due to variable month lengths, especially in a leap-year (try testing it with dates of 27/02/2024 - 02/03/2024 and then 27/02/2025 - 02/03/2025 to highlight this issue).
Attached is another option which tries to get around this by using the 'daysinmonth' function.
Regards,
Derek.

13

(15 replies, posted in Russian)

Hello Jean,
Yes, all good here - hopefully the same at your end.
I looked at Lazarus a while ago but kept returning to MVD - for me, I just find it quicker to develop something and, although there may be fewer features in total, they are ones that I often use.. 
And since 'styles' were added to MVD, I think you can develop good looking applications with not much effort. 
Although I've been using MVD for quite a while now, I'm always amazed at some new function or 'trick' that I discover.  It makes me realise that with MVD, the more you explore, the more you discover.
And up till now (and often with help from other Forum users), there's nothing that I haven't been able to get done.
But I also remember that you have a Delphi background, so Lazarus would make a lot of sense to you as well as MVD.
Derek.

14

(15 replies, posted in Russian)

Поскольку MyVisualDatabase больше не находится в активной разработке, активность на форуме неизбежно снизится.

Я думаю, что отклик на форуме во многом зависит от того, как вы задаёте вопрос. К сожалению, шаблона для сообщения о проблемах нет (что, на мой взгляд, было бы полезно), но, на мой взгляд, как минимум, стоит попробовать:
* кратко описать (цель и задачи) того, чего пытается достичь ваш проект (чтобы обозначить контекст вашей проблемы);
* дать чёткое и подробное объяснение вашей конкретной проблемы (то, что очевидно вам, не будет очевидно другим, особенно потому, что многие из нас будут использовать онлайн-переводчик).
* приложить проект с достаточным количеством существенных данных для иллюстрации вашей проблемы.
* указать, что вы уже пробовали и что не сработало (вместо того, чтобы задавать вопросы бездействуя); довольно часто этот вопрос поднимался (и на него уже были даны ответы) в других разделах форума.
* если применимо, предоставьте некоторые объёмные данные — решение для одного пользователя и нескольких сотен строк данных может отличаться от решения для многих пользователей с тысячами строк данных.
* Укажите, какую версию MVD и Windows вы используете.

По моему опыту, ответы других участников форума всегда были чрезвычайно полезны, особенно учитывая, что они волонтёры и щедро делятся своим временем бесплатно.

Derek.
.
.
Since MyVisualDatabase is no longer in active development, forum activity is bound to decline.

I think the response you get on the forum depends a lot on how you ask the question.
Unfortunately, there is no template for asking for help (which I think would be useful), but in my opinion, at a minimum, you should try to:
* give a brief overview (goal and objectives) of what your project is trying to achieve (to indicate the context of your problem);
* give a clear and detailed explanation of your specific problem (what is obvious to you will not be obvious to others particularly because many of us will be using an on-line translator).
* attach a project with enough relevant data to illustrate your problem.
* indicate what you have already tried and what has not worked (instead of just raising questions without doing anything); quite often an issue will have already been raised (and answered) elsewhere in the forum.
*if relevant, provide some volumetrics — a solution for one user and a couple of hundred rows of data may differ from a solution for many users with thousands of rows of data.
* specify which version of MVD and Windows you are using.

In my experience, the responses of other forum participants have always been extremely helpful, especially considering they are volunteers and generously give their time for free.

15

(13 replies, posted in General)

Hi Roberto, Sparrow,
You first need to click on a number (1-9) and then click in the cell where you want to place that number.  Perhaps you are trying to do it the other way round?
Similarly, if you want to place "possible" numbers, first click on a number (1-9), then click on the 'pencil' and then click in the cell(s) where you want to place that "possible" number (it's a really neat feature).
Thanks,
Derek.

Привет Oleg!
Есть несколько вариантов.
1. Вы можете жёстко задать требуемые значения (см. приложение «Пример 1» как один из способов).
Но этот подход очень строгий и может привести к дополнительной работе, если потребуется добавить новые значения или изменить существующие.
Возможно, лучшим вариантом будет использование уже доступной функции «Роли».
2. Используйте «Роли» для ограничения доступа определённым пользователям; это позволит добавлять/изменять значения в будущем (см. «Пример 2»).
a) Если вы войдете в систему как «oleg» (пароль «oleg»), у вас будет полный доступ.
б) если вы входите в систему как «derek» (пароль — «derek»), на экране «конфигурации» опция сохранения «СТАТУСА» недоступна (как и опция сохранения «ПОЛЬЗОВАТЕЛЕЙ»).
«Роли» — одна из самых мощных функций MVD (но, как я подозреваю, используемая нечасто).
С уважением,

17

(8 replies, posted in General)

Hi Sparrow,
Edit1 is not doing anything now - I'd just forgotten to remove it. 
I'd been trying to make the clock flash every second and needed a form object that I could attach an 'on change' procedure.to.
But in the end, the flashing was just annoying (and giving me a headache sad) so I didn't bother!
Attached is a version that has been cleaned up.
Regards,
Derek.

18

(8 replies, posted in General)

Hi Sparrow, Salut Jean,
A simplified version of the project (without any reminders / alarms) that shows the time on screen in an 'always on top, 'see-through' style (left mouse button and hold to drag it around the screen, right mouse button to close it).
Regards,
Derek.

19

(8 replies, posted in General)

Hi Sparrow,
Many thanks.  It works exactly how I want and I've learnt a couple of new things from both of your solutions so it's been doubly useful.
I've used the first option - left click on the Windows title bar and drag is how all other Windows applications work so it's better to be consistent.
I'd read about 'releasecapture' but couldn't get the syntax.
But I also like the second option' - I'd always thought that 'getcursoratpos' related to the position of an object on the FORM but it actually relates to the cursor position on the whole SCREEN - useful to know.
I've more or less finished how I want the application to work so it's attached for anyone who's interested.
Thanks,
Derek.

20

(8 replies, posted in General)

Hi All,
I have a small application that displays the time and sends me a message after a set period (currently 60 minutes)
I want to drag the form anywhere on the screen when I use a 'mouse down' action (right-click) on Form1.label1 (which displays the time).
The problem is that in order to keep the form as unobtrusive as possible, I set it to have 'no borders'.  So the question is how to drag a form around the screen when the windows title bar is not visible.
Using Windows10 and MVD 6.5.
Any help would be appreciated.
Derek.

Привет, Олег!
Если я правильно понял твой вопрос, есть пара моментов, которые, на мой взгляд, стоит учесть.
1. Если тебя интересует только то, какой «сотрудник» в данный момент владеет каким «инструментом», то «сотрудник» — это просто атрибут таблицы «инструменты»; таким образом, таблица «выдача инструментов» не нужна (см. «Инструменты 1» во вложении).
2. Не думаю, что использование двух «таблиц» — наиболее эффективный способ проверки данных: ты не узнаешь, был ли выдан «инструмент» или нет, и если да, то какому «сотруднику», пока не нажмёшь на строку в основной таблице. Не проще ли отобразить всю информацию в единой «таблице», которая одновременно показывает, какие «инструменты» доступны, какие выданы и кому, сколько инструментов у каждого «сотрудника» в любой момент времени и т.д. (см. «Инструменты 2» во вложении).
3. Таблица «выдачи инструментов» вам понадобится, если вы хотите увидеть историю выдачи инструментов, кому они были выданы, когда они были выданы и когда были возвращены. Возможно, это не обязательное требование, но чтобы понять, как это можно сделать, см. «Инструменты 3» во вложении).
Надеюсь, это даст вам несколько идей.
С уважением,
Derek.

Please attach your project (delete the .exe file and then zip up the project folder) so that the problem can be correctly understood.
However, from what you've told us, I don't think you'll need to add any additional code to achieve this - it sounds like all you need to do is add a 'search' button and associate it with the combobox (optionally using the 'incremental search' feature).
Derek.

Привет, Олег!
Как и ты, я пытался изучать Паскаль по разным источникам. Однако, поскольку MVD использует лишь подмножество функций Pascal, это оказалось скорее запутанным, чем полезным.
Мой совет — воспользуйтесь этим форумом. Конечно, это менее структурированный способ обучения, но вы можете быть на 100% уверены, что изученное действительно будет работать в MVD.
Если вы не можете найти ответы, я всегда находил, что участники форума с готовностью дадут советы по конкретным вопросам.
А для общего обзора того, как Паскаль используется некоторыми функциями MVD, ChatGPT действительно даёт довольно полезный обзор.
Наконец, имейте в виду, что в зависимости от того, используете ли вы SQLite или MySQL, вы можете заметить небольшие различия в синтаксисе.
С уважением,
Derek.

24

(5 replies, posted in Script)

Hi,
Your updated project doesn't appear to be much different from the previous one - is it the latest version?
If you have difficulties attaching it will probably be due to the size of images that you've used so you could try removing them just to enable the upload or replace them with smaller / lower quality images.
In general, images, if stored within the application (storefile type) can affect the size of your project's exe considerably and cause it to run slowly;  it is generally recommended that if you are going to use a lot of images, then you should use the 'linkfile' type instead.
Derek.

25

(8 replies, posted in General)

Hi Sparrow,
Just tried out your WinAmp application - it works very well.
Thanks for sharing.
D.