2,876

(13 replies, posted in Russian)

pt.82
Для каждого ComboBox-а должна быть отдельная таблица БД, в вашем случае вы сохраняете все в таблице db_items ?
Либо я не понял задумку.

2,877

(8 replies, posted in General)

v_pozidis wrote:

I belive that it's better to have the choice to select the language in the buttons because I will give you an example.
I live in Greece, my Os version is in English.  If I use the new routine (Translate) I will get a message in Greek but the language in the buttons will be in English.

Windows is not provide possibility to translate buttons in system dialog by user.

Проверить в The Bat возможности нет, проверил почтовым клиентом встроенным в оперу, все ок. Думаю тут ничего не поделать, лучше отправить письмо непосредственно из проекта.

2,879

(8 replies, posted in General)

tcoton wrote:

Cool!!
Would it work with variables for 'your message' in case of multilingual application?

Let's say the user could choose between 2 or 3 languages at application start and would get the "system" message in the chosen language.

Yes.

var
   s: string;
begin
   s := 'Your message';
   Translate('This_Field_is_required', s);

2,880

(8 replies, posted in General)

v_pozidis wrote:

Grate news, it's nice to get messages in your language. You should also have the choice to translate  the buttons Cancel, Yes,No  of the message box and not only the message.

Buttons will translate automatically to language which uses in your Windows OS.

nitin.ingale08 wrote:

Sir,

Is this bug?

Or we need to add some script to remove this below problem.

Header, Footer and grid line are get missing at 2nd ....3rd... time opening form.

because of this - I need to restart application, but 1st time ok, then again problem start...

please see attach photo for problem.

Please see your Sample ERP Revised 2 file.

Regards
Nitin Ingale

Just remove this script

procedure DeliverableTracking_OnShow (Sender: string; Action: string);
begin
    DeliverableTracking.TableGrid2.Options := DeliverableTracking.TableGrid2.Options + goFooter;
    DeliverableTracking.TableGrid3.Options := DeliverableTracking.TableGrid3.Options + goFooter;
    DeliverableTracking.TableGrid5.Options := DeliverableTracking.TableGrid5.Options + goFooter;
    DeliverableTracking.TableGrid6.Options := DeliverableTracking.TableGrid6.Options + goFooter;
    DeliverableTracking.TableGrid8.Options := DeliverableTracking.TableGrid8.Options + goFooter; 
end;

Set option goFooter using Object inspector for TableGrids.

2,882

(8 replies, posted in General)

Hello.


Please download latest beta version 3.7
https://www.dropbox.com/s/eef9rf7u08k63 … b.zip?dl=0


Now you can translate any messages to another language.

Translate('This_Field_is_required', 'your message');

you can call this function in an event OnShow of main form or between begin end in the bottom of script.


identifications for another messages

Open_report_designer
Your_computer_does_not_have_Excel
Entry_to_edit_is_no_selected
Unable_to_determine_the_record_ID
Please_select_record_in_grid
Report_file_not_found
Entry_to_be_deleted_is_not_selected
Are_you_sure_you_want_to_delete_the_record
The_database_file_is_not_found
Not_a_number
Are_you_sure_you_want_to_delete_the_image_from_the_database
There_is_no_file_to_save
Do_you_really_want_to_delete_the_file_from_the_database
Restart_the_program_to_apply_the_settings
This_Field_is_required
Not_permitted_to_use_ComboBox_for_saving_record
Saving_or_opening_file_from_database
Select_file_stored_in_database
Export_image_from_database
Open_image_to_save_the_database
Delete_Image
Calculated_field
Counter_field
Open_file
Save_file
Delete_file
Open_folder_with_file
Clear
Open
Component
No_data_to_add
File_not_found
Confirm
Error
Info
Yes
No

какой почтовый клиент используется?

Здравствуйте.


Создавать компоненты на форме можно и динамически скриптом. Приложите пожалуйста ваш проект (zip файл без exe и dll) постараюсь помочь.

2,885

(24 replies, posted in Russian)

pt.82
Приветствую.


1. К сожалению не могу понять вопроса.


2. В данном вопросе есть противоречие. Создание копии записи, подразумевает собственно ее создание, тогда форма будет открыта уже не для создания новой записи, а редактирования.


Можете сделать так, на форме редактирования записи разместите кнопку, которая будет сохранять открытую запись как новую, для данной кнопки создайте событие OnClick

procedure Form2_Button2_OnClick (Sender: string; var Cancel: boolean);
begin
    Form2.Button2.dbGeneralTableId:=-1;
    Form2.Button2.Click;
end;

2,886

(1 replies, posted in General)

Hello.


Check it out

var
       ds: TfrxDataSet;  
       sValue: string;
begin
       ds := Report.GetDataset('report');
       while not ds.eof do
       begin
           sValue := ds.Value('fieldname');
           ds.Next;
       end; 

2,887

(9 replies, posted in General)

Example here
http://myvisualdatabase.com/forum/viewtopic.php?id=3084


Please attach your project.

2,888

(6 replies, posted in Russian)

   s := Form1.Edit4.Text;
   s := ReplaceStr(s, 'R', '');
   s := ReplaceStr(s, 'G', '');
   s := ReplaceStr(s, 'O', '');
   s := ReplaceStr(s, 'P', '');
   Form1.Edit4.Text := s;

2,889

(9 replies, posted in General)

v_pozidis
Just use MessageBox function instead MessageDlg.
Function MessageBox will translate automatically buttons to your language which uses in your Windows OS.

Просто расположите на форме для поиска компонент ComboBox, свойству присвойте значение
ForeignKey=FavoriteFood.id_food
FieldName= foodname


добавьте этот компонент в настройки кнопки Поиск.

2,891

(9 replies, posted in Russian)

sysscrew
Исправил ошибку, скачайте пожалуйста проект с примером снова.

2,892

(6 replies, posted in Russian)

проще всего так

var
   s: string;
begin
   s := 'R67XR77OP39G712';
   s := ReplaceStr(s, 'R', '');
   s := ReplaceStr(s, 'G', '');
   s := ReplaceStr(s, 'O', '');
   s := ReplaceStr(s, 'P', '');

функция ReplaceStr заменяет найденную подстроку в строке, в данном случае заменяет ее на пустоту, т.е. удаляет.

2,893

(1 replies, posted in Russian)

Пожалуйста приложите ваш проект с описанием действий приводящих к этому.

2,894

(16 replies, posted in Russian)

Можно так

procedure Form1_OnShow (Sender: string; Action: string);
var
    i,c: integer;
begin
    // присваиваем всем текстовым компонентам на форме событие EditsOnChange
    c := Form1.ComponentCount-1;
    for i := 0 to c do
        if Form1.Components[i] is TdbEdit then TdbEdit(Form1.Components[i]).OnChange := @EditsOnChange;
end;

procedure EditsOnChange(Sender: TObject);
begin
    if TdbEdit(Sender).Text ='0'   then TdbEdit(Sender).Color:= clLime;
    if TdbEdit(Sender).Text ='1'   then TdbEdit(Sender).Color:= clRed;
    if TdbEdit(Sender).Text ='2'   then TdbEdit(Sender).Color:= clBlack;
    if TdbEdit(Sender).Text ='3'   then TdbEdit(Sender).Color:= clRed;
    if TdbEdit(Sender).Text ='4'   then TdbEdit(Sender).Color:= clBlack;
    if TdbEdit(Sender).Text ='5'   then TdbEdit(Sender).Color:= clRed;
    if TdbEdit(Sender).Text ='6'   then TdbEdit(Sender).Color:= clBlack;
    if TdbEdit(Sender).Text ='7'   then TdbEdit(Sender).Color:= clRed;
    if TdbEdit(Sender).Text ='8'   then TdbEdit(Sender).Color:= clBlack;
    if TdbEdit(Sender).Text ='9'   then TdbEdit(Sender).Color:= clRed;
    if TdbEdit(Sender).Text ='10'   then TdbEdit(Sender).Color:= clBlack;
    if TdbEdit(Sender).Text ='11'   then TdbEdit(Sender).Color:= clBlack;
    if TdbEdit(Sender).Text ='12'   then TdbEdit(Sender).Color:= clRed;
    if TdbEdit(Sender).Text ='13'   then TdbEdit(Sender).Color:= clBlack;
    if TdbEdit(Sender).Text ='14'   then TdbEdit(Sender).Color:= clRed;;
    if TdbEdit(Sender).Text ='15'   then TdbEdit(Sender).Color:= clBlack;
    if TdbEdit(Sender).Text ='16'   then TdbEdit(Sender).Color:= clRed;;
    if TdbEdit(Sender).Text ='17'   then TdbEdit(Sender).Color:= clBlack;
    if TdbEdit(Sender).Text ='18'   then TdbEdit(Sender).Color:= clRed;
    if TdbEdit(Sender).Text ='19'   then TdbEdit(Sender).Color:= clRed;
    if TdbEdit(Sender).Text ='20'   then TdbEdit(Sender).Color:= clBlack;
    if TdbEdit(Sender).Text ='21'   then TdbEdit(Sender).Color:= clRed;
    if TdbEdit(Sender).Text ='22'   then TdbEdit(Sender).Color:= clBlack;
    if TdbEdit(Sender).Text ='23'   then TdbEdit(Sender).Color:= clRed;
    if TdbEdit(Sender).Text ='24'   then TdbEdit(Sender).Color:= clBlack;
    if TdbEdit(Sender).Text ='25'   then TdbEdit(Sender).Color:= clRed;
    if TdbEdit(Sender).Text ='26'   then TdbEdit(Sender).Color:= clBlack;
    if TdbEdit(Sender).Text ='27'   then TdbEdit(Sender).Color:= clRed;
    if TdbEdit(Sender).Text ='28'   then TdbEdit(Sender).Color:= clBlack;
    if TdbEdit(Sender).Text ='29'   then TdbEdit(Sender).Color:= clBlack;
    if TdbEdit(Sender).Text ='30'   then TdbEdit(Sender).Color:= clRed;
    if TdbEdit(Sender).Text ='31'   then TdbEdit(Sender).Color:= clBlack;
    if TdbEdit(Sender).Text ='32'   then TdbEdit(Sender).Color:= clRed;
    if TdbEdit(Sender).Text ='33'   then TdbEdit(Sender).Color:= clBlack;
    if TdbEdit(Sender).Text ='34'   then TdbEdit(Sender).Color:= clRed;
    if TdbEdit(Sender).Text ='35'   then TdbEdit(Sender).Color:= clBlack;
    if TdbEdit(Sender).Text ='36'   then TdbEdit(Sender).Color:= clRed;
end;

2,895

(4 replies, posted in Russian)

Проделайте тоже самое для всех остальных форм

procedure Form2_OnShow (Sender: string; Action: string);
begin
   SetWindowPos(Form2.Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE or SWP_NOMOVE or SWP_NOACTIVATE)
end;

2,896

(9 replies, posted in General)

v_pozidis wrote:

Can I also Change the YES  or NO in the Buttons in an other language?

Check out this topic
http://myvisualdatabase.com/forum/viewtopic.php?id=3084

You can use timer and function GetFilesList to periodically check if there were changes in the folder.

2,898

(2 replies, posted in General)

Hello.


If between these tables there is no any relationship, you should use SQL query:


SELECT date, work FROM tabone 
UNION ALL
SELECT date, meeting FROM tabtwo
ORDER BY date

Example of reminder
http://myvisualdatabase.com/forum/misc. … download=1

2,899

(4 replies, posted in Russian)

Скачайте пожалуйста последнюю бета версию 3.7
https://www.dropbox.com/s/eef9rf7u08k63 … b.zip?dl=0


таким образом можете сделать окно по верх всех остальных окон.

procedure Form1_OnShow (Sender: string; Action: string);
begin
   SetWindowPos(Form1.Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE or SWP_NOMOVE or SWP_NOACTIVATE)
end;

2,900

(2 replies, posted in Russian)

Stres
Приложите пожалуйста ваш проект (zip файл без exe и dll), проверю в чем дело.