1

(13 replies, posted in FAQ)

salvatorevicari85 wrote:

I'm playing around with Derek's code a bit.
I can't figure out how to write the script to hide a TabSheet, using "Visible=False" method.
I'll post the code but it's definitely wrong.

https://myvisualdatabase.com/forum/misc.php?action=pun_attachment&item=10544&download=0

2

(4 replies, posted in General)

StateOne wrote:

How to open??

это от другой программы
this is from another program

3

(4 replies, posted in General)

парень форумы перепутал )

4

(13 replies, posted in General)

не понимаю зачем вам даты  и зачем вы пытаетесь преобразовывать минуты.

var
time:TDateTime;
timer:TTimer;
time2:TDateTime = StrToDateTime('00:00:01');


procedure Form1_OnShow (Sender: TObject; Action: string);
begin
  Form1.ComboBox1.Items.Add('30 minutes');
  Form1.ComboBox1.Items.Add('60 minutes');
  Form1.ComboBox1.Items.Add('90 minutes');
  Form1.ComboBox1.Items.Add('120 minutes');
end;

procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
begin
  CASE Form1.ComboBox1.ItemIndex OF
   0: time := StrToTime('00:30:00');
   1: time := StrToTime('01:00:00');
   2: time := StrToTime('01:30:00');
   3: time := StrToTime('02:00:00');
  end;
  timer:=TTimer.Create(form1);
  timer.Interval := 1000;
  timer.OnTimer := @timego;
  timer.Enabled := True;
end;

procedure timego;
begin
  time := time-time2;
  Form1.Edit1.Text := TimeToStr(time);
end;

и второй вариант

var
time:TDateTime;
timer:TTimer;
time2:TDateTime = StrToDateTime('00:00:01');


procedure Form1_OnShow (Sender: TObject; Action: string);
begin
  if (SQLExecute('SELECT COUNT(id) FROM time') = 0) then
  begin
    SQLExecute('INSERT INTO time(name,time)VALUES("30 minutes","00:30:00")'+
    ',("60 minutes","01:00:00"),("90 minutes","01:30:00"),("120 minutes","02:00:00")');
    UPDATEDATABASE('time');
  end;

end;

procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
begin
  time := SQLDateTimeToDateTime(SQLExecute('SELECT time FROM time WHERE id='+Form1.ComboBox1.sqlValue));
  timer:=TTimer.Create(form1);
  timer.Interval := 1000;
  timer.OnTimer := @timego;
  timer.Enabled := True;
end;

procedure timego;
begin
  time := time-time2;
  Form1.Edit1.Text := TimeToStr(time);
end;

5

(13 replies, posted in General)

m.alin wrote:

Dear Vladimir,

Thank you for your solution.
I still need some advice to implement this one.
I have a textbox where I will enter minutes.
I want to add the currentdateTime + textbox.text and assign them to datetimepicker2 (according your example) and only then to run the start button.
How can I convert text value into time and assign it to the textbox and then to make the calculation?

Thank you once again for your help.

BR,
Alin

6

(4 replies, posted in Russian)

Получается автор и не собирался этот компонент использовать, но видимо он с чем-то подтянулся? или случайно обрубил обработчика ?

7

(4 replies, posted in Russian)

может все таки кто-то сработает

 property OnChange: TNotifyEvent;

  

Event handler signalled when the Position in the control has been changed.

  property OnChangeBounds: TNotifyEvent;

  

Event handler signalled when the Bounds for the control have been changed.

  property OnClick: TNotifyEvent;

  

Notification handler for mouse clicks.

  property OnContextPopup: TContextPopupEvent;

  

Invoked when a context-sensitive pop-up menu is requested.

  property OnDragDrop: TDragDropEvent;

  

Event handler signalled when an object is dropped onto the control.

  property OnDragOver: TDragOverEvent;

  

Event handler signalled when a control is dragged over the control instance.

  property OnEndDrag: TEndDragEvent;

  

Event handler signalled for the end of a drag-drop operation.

  property OnEnter: TNotifyEvent;

  

Event handler signalled when the control receives focus.

  property OnExit: TNotifyEvent;

  

Event handler signalled when the control loses focus.

  property OnMouseDown: TMouseEvent;

  

Event handler signalled when a mouse down event is handled for the control.

  property OnMouseEnter: TNotifyEvent;

  

Event handler signalled when the mouse pointer has entered the control.

  property OnMouseLeave: TNotifyEvent;

  

Event handler signalled when the mouse pointer has left the control.

  property OnMouseMove: TMouseMoveEvent;

  

Event handler signalled when the mouse pointer is moved in the control.

  property OnMouseUp: TMouseEvent;

  

Event handler signalled when a mouse up event is handled for the control.

  property OnMouseWheel: TMouseWheelEvent;

  

Event handler for mouse wheel turned.

  property OnMouseWheelDown: TMouseWheelUpDownEvent;

  

Event handler signalled for a downward movement of the mouse wheel.

  property OnMouseWheelUp: TMouseWheelUpDownEvent;

  

Event handler signalled for an upward movement of the mouse wheel.

  property OnMouseWheelHorz: TMouseWheelEvent;

  

Event handler signalled for a horizontal movement of the mouse wheel.

  property OnMouseWheelLeft: TMouseWheelUpDownEvent;

  

Event handler signalled for a leftward movement of the mouse wheel.

  property OnMouseWheelRight: TMouseWheelUpDownEvent;

  

Event handler signalled for a rightward movement of the mouse wheel.

  property OnKeyDown: TKeyEvent;

  

Event handler signalled for key down keyboard events.

  property OnKeyPress: TKeyPressEvent;

  

Event handler signalled for character data entered by the user.

  property OnKeyUp: TKeyEvent;

  

Event handler signalled when a key up event has occurred for the control.

  property OnResize: TNotifyEvent;

  

Notification handler for a resize of the control.

  property OnStartDrag: TStartDragEvent;

  

Event handler signalled for the start of a dragging operation.

  property OnUTF8KeyPress: TUTF8KeyPressEvent;

8

(13 replies, posted in General)

var
time:TDateTime;
timer:TTimer;
time2:TDateTime = StrToDateTime('00:00:01');

procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
begin
  time := Form1.DateTimePicker2.Time - Form1.DateTimePicker1.Time;
  timer:=TTimer.Create(form1);
  timer.Interval := 1000;
  timer.OnTimer := @timego;
  timer.Enabled := True;
end;

procedure timego;
begin
  time := time-time2;
  Form1.Time.Caption := TimeToStr(time);
end;
andre.kolin wrote:

Господа! Может кто-то имеет наброски проекта автоматизации работы общепитовской столовой?

что ты хочешь? кассу? приложение по заказам? сам как видишь это? это просто приложение в котором нужно зафиксировать продажу товара?

10

(4 replies, posted in General)

https://fileworld.pavlenkovv.ru/img/ScreenRecorderProject663.gif

11

(5 replies, posted in Russian)

что значит sostav_2 ?
для чего эта таблица??

12

(5 replies, posted in Script)

viii,myvalue  : integer;
var  viii: integer; 

FOOD

https://fileworld.pavlenkovv.ru/img/focus.gif

15

(5 replies, posted in Russian)

Вынуть дату из БД

 myDate : TDateTime = SQLDateTimeToDateTime();

потом можете их как угодно арифметить  big_smile big_smile big_smile big_smile
   

Case When oformlen = 1
THEN '+' ELSE ''     
END 

в данном варианте вроди как не заменяется символ, а создается поле

16

(8 replies, posted in Russian)

Новичок wrote:

[*]При создании новой записи, в поле выбора КАТАЛОГА (ComboBox1) необходимо вывести последнее из сохраненных значений[/*]

последняя запись всегда имеет маскимальное значение ID
SELECT MAX(....)

17

(18 replies, posted in General)

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

Patriot10200 wrote:

И снова здравствуйте, может кто сталкивался, и расскажет как поправить, после поиска поле расход в таблице успешно превращается в нули.
С верху до поиска,
С низу после

НУЖЕН ВАШ ПРОЕКТ

19

(4 replies, posted in General)

https://myvisualdatabase.com/forum/misc.php?action=pun_attachment&item=10314&download=0

20

(4 replies, posted in General)

identity wrote:

Thanks for the reply
I know that I can choose not to use cascade.
I have attached a sample.
suppose you record something wrong in a (combobox1 Mainform) and you want to delete it while keeping other data.
If I don't use cascade delete then I get an error
If I use cascade delete all the data are lost.
What I need to do is that when I delete the data in (Tablegrid1 Bank) other data that are recorded should be intact and only the data of (combobox1 Mainform) should be cleared.
Do you think it can be done using a script?
thanks a lot

А Вам и не нужно ни чего удалять, просто перейдите в редактирование записи и в ComboBox выберете пустое поле, нажмите сохранить
 
And you don’t need to delete anything, just go to edit the entry and select an empty field in the ComboBox, click save

21

(10 replies, posted in General)

lara.0080 wrote:

hi everyone

i am new to the app and i am trying some concept . i use a table called tempx that have a date filed , and when i  chose a date from date time picker and click save button the date stored in table but i have two problems
if i chose the same date it will store it again and i don't want this , i try to use sql but i have to change the date to string and i don't want that , is there a solution for this ??
second think i want to save each row in tempx date to other table with some other info, how to do this ???

i have attached the program ....

procedure Form1_Button2_OnClick (Sender: TObject; var Cancel: boolean);
begin
  if ( SQLExecute('SELECT COUNT(id) FROM tempx WHERE Date='+ Form1.DateTimePicker1.sqlDateTime) <> 0) then Cancel := True;
end;

22

(2 replies, posted in Russian)

Новичок wrote:

Здравствуйте.
Помогите мне с проектом.
При заполнении поля КЛЮЧ(Edit1) как сделать, что бы данные из базы данных подтягивались в поле Имя (Edit2)
Проект прилагаю.

procedure Form1_Edit1_OnChange (Sender: TObject);
begin
  if (Form1.Edit1.Text <> '') then
  Form1.Edit2.Text := SQLExecute('SELECT user_name FROM user_log WHERE user_key='''+Form1.Edit1.Text+'''') else
  Form1.Edit1.Text := '';
end;

23

(9 replies, posted in Russian)

6katran6 wrote:

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

опишите точнее

24

(1 replies, posted in General)

AD1408 wrote:

I was wandering if there is a way to link (hyperlink) a word in RTF editor to a tree node?

нужно искать на форуме, несколько лет назад я уже задовал такой вопрос Дмирию.
you need to search on the forum, several years ago I already asked this question to Dmitry.

25

(2 replies, posted in General)

https://avatars.mds.yandex.net/i?id=b387ff80892f29af7681c9049b5688dc06a276d3-10639912-images-thumbs&amp;ref=rim&amp;n=33&amp;w=193&amp;h=200