Показать сообщение отдельно
  #2  
Старый 25.01.2011, 11:11
Black Raider Black Raider вне форума
Местный
 
Регистрация: 31.05.2010
Адрес: Москва
Сообщения: 466
Версия Delphi: 7
Репутация: 40
По умолчанию

Где то так:
Код:
procedure TForm1.Button1Click(Sender: TObject);
var t1,t2:TTime;
    f,b:integer;
    beginCell,endCell:string;
   H1, M1, S1, MS1,
   H2, M2, S2, MS2: Word;
begin
t1:=strtoTime(edit1.Text);
t2:=strtoTime(edit2.Text);
DecodeTime(t1,h1,m1,s1,ms1);
DecodeTime(t2,h2,m2,s2,ms2);
f:=(h2-h1)*60+(m2-m1);
f:=f div 5;
b:=(h1-5)*12;
beginCell:=chr(97+b);
endCell:=chr(97+b+f-1);
label1.Caption:=timetostr(t1)+' - '+timetostr(t2)+'  :'+floattostr(f)+'  :'+floattostr(b);
label2.Caption:=beginCell+' : '+endCell;
end;
__________________
Новый вирус - "БОМЖ"! Он просто роется в Корзине...и спит под ярлычком "Сетевое окружение"
Ответить с цитированием