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.
My Visual Database → Posts by pavlenko.vladimir.v
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.
How to open??
это от другой программы
this is from another program
не понимаю зачем вам даты и зачем вы пытаетесь преобразовывать минуты.
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;
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
Получается автор и не собирался этот компонент использовать, но видимо он с чем-то подтянулся? или случайно обрубил обработчика ?
может все таки кто-то сработает
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;
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;
Господа! Может кто-то имеет наброски проекта автоматизации работы общепитовской столовой?
что ты хочешь? кассу? приложение по заказам? сам как видишь это? это просто приложение в котором нужно зафиксировать продажу товара?
что значит sostav_2 ?
для чего эта таблица??
viii,myvalue : integer;
var viii: integer;
FOOD
Вынуть дату из БД
myDate : TDateTime = SQLDateTimeToDateTime();
потом можете их как угодно арифметить
Case When oformlen = 1
THEN '+' ELSE ''
END
в данном варианте вроди как не заменяется символ, а создается поле
[*]При создании новой записи, в поле выбора КАТАЛОГА (ComboBox1) необходимо вывести последнее из сохраненных значений[/*]
последняя запись всегда имеет маскимальное значение ID
SELECT MAX(....)
Он должен вернуться, просто он немного перегорел. Вполне возможно, что именно сейчас он создает новый конструктор
И снова здравствуйте, может кто сталкивался, и расскажет как поправить, после поиска поле расход в таблице успешно превращается в нули.
С верху до поиска,
С низу после
НУЖЕН ВАШ ПРОЕКТ
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
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;
Здравствуйте.
Помогите мне с проектом.
При заполнении поля КЛЮЧ(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;
в общем такая проблема не могу сделать поиск по комплектующим и там еще есть поле где ставится дата когда товар был приобретен не сохраняет данные тоже спасибо за понимания и помощь заранее благодарен...
опишите точнее
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.
My Visual Database → Posts by pavlenko.vladimir.v
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi