Падение с ускорением

Падение с ускорением

Программа демонстрирует процесс падения мячика с ускорением.

Расположите на форме два компонента Shape1 и Shape2: TShape с вкладки Additional и компонент Timer1: TTimer с вкладки System, а также Button1: TButton

В инспекторе объектов (Object Inspector) выставьте начальные значения для каждого компонента

Shape2
 Left: 88 (отступ слева)
 Top: 8  (отступ сверху)
 Width: 17  (ширина шарика)
 Height: 17  (высота шарика)
 Shape: stCircle;  (вид фигуры - круг)

Shape1
 Left: 65 (отступ слева)
 Top: 24  (отступ сверху)
 Width: 63  (ширина доски)
 Height: 9  (высота доски)
 Shape: stRectangle;  (вид фигуры - прямоугольник)

Timer1
 Enabled: False;
 Interval: 100 (скорость вызова процедуры движения 0.1 c)

Теперь в инспекторе объектов переключитесь на вкладку Events и для компонента Timer1 задайте название процедуры OnTimer (лучше это сделать автоматически кликнув два раза в пустом поле)

procedure TForm1.Timer1Timer(Sender: TObject);
begin
  Shape2.Top := Shape2.Top + G; // приращение движения
  G := G + 1; // приращение ускорения
  // проверка на достижения нижней границы формы
  if Shape2.Top > Form1.ClientHeight - 2 * Shape2.Height then
      Timer1.Enabled := false;
end;

Аналогично выберите кнопку Button1 и создайте процедуру на событие OnClick

procedure TForm1.Button1Click(Sender: TObject);
begin
  Shape1.Visible := false;
  Timer1.Enabled := true;
  Button1.Enabled := false;
  Shape2.Top := 8;
  G := 1;
end;

В окне кода не забыть в разделе Var прописать

var
  Form1: TForm1;
  G : Integer;

Запустите программу. Run.

СКАЧАТЬ ПРОГРАММУРазмер
Демо-урок: Падение с ускорением (344)912 кб

Отправил Сб, 02/04/2017 - 05:06

es8999 http://paydaytrust.review payday loans washington state fq9077mo4932

Отправил Сб, 02/04/2017 - 04:31

gm9812 http://paydaytrust.review nj payday loans ag5630zi4702

Отправил Сб, 02/04/2017 - 03:55

fj1988 http://levtrust.men viagra pushups levitra online bs5716hk6330

Отправил Сб, 02/04/2017 - 03:20

bk8986 http://ciatrust.review buy cialis 20mg dj8784fa1565

Отправил Сб, 02/04/2017 - 02:44

sg4331 http://paydaytrust.review does project payday really work gr9328xs4919

Отправил Сб, 02/04/2017 - 02:08

vl8411 http://levtrust.men generic levitra montreal mp9179uz1778

Отправил Сб, 02/04/2017 - 01:34

yr5250 http://canpharm.win generic viagra names fu4432xg380

Отправил Сб, 02/04/2017 - 00:58

vn792 http://viatrust.review pleasure viagra ac598ml7132

Отправил Сб, 02/04/2017 - 00:22

hq9583 http://ciatrust.review metformin onset of action cialis generic pills ct1362yb9865

Отправил Пт, 02/03/2017 - 23:47

ch3598 http://viatrust.review viagra gel pj4168kb2449

Отправил Пт, 02/03/2017 - 23:11

dn9518 http://canpharm.win free samples of viagra gy8194jw1306

Отправил Пт, 02/03/2017 - 22:36

fn8772 http://levtrust.men buy levitra online and save ec5930ax3754

Отправил Пт, 02/03/2017 - 22:01

ej7956 http://viatrust.review viagra cost per pill th7903en2285

Отправил Пт, 02/03/2017 - 21:25

eo5704 http://ciatrust.review best generic cialis rw485tt3572

Отправил Пт, 02/03/2017 - 20:50

pp1125 http://canpharm.win best viagra pills jy5530tm6738

Отправил Пт, 02/03/2017 - 20:14

ly4359 http://levtrust.men levitra uk online bj4534ot600

Отправил Пт, 02/03/2017 - 18:43

gk4606 http://viagra-online.men viagra india ht7868re4651 Viagra Without a Doctor Prescription viagra use statistics qw2029 Viagra Coupons viagra experiences nq1555 Eating crappy food isnt a return -- its a chastening

Отправил Пт, 02/03/2017 - 14:47

yh8783 http://zithromax.party azithromycin drug interactions nausea vomiting diarrhea vq5755 Zithromax Over Counter cheap azithromycin online prescription av8277 Zithromax 500 MG Dosage buy zithromax online dm9020 Exude a confess rations be thy physic and drug be thy subsistence

Отправил Пт, 02/03/2017 - 10:54

id1650 http://levitra-online.men generic levitra online pharmacies dj1978ge4564 order cheap levitra from online pharmacy generic levitra price yi8781 Levitra Without a Doctor Prescription cheap levitra pills generic ub590 We are fine fettle barely to the size that our ideas are humane

Отправил Пт, 02/03/2017 - 07:02

us1808 http://ciatrust.review real cialis online cialis tablets for sale ds5219 The individual who says it is not reasonable should ploy out of the way of those doing it

Отправил Пт, 02/03/2017 - 03:58

Wine is the most healthful and most hygienic of beverages xk5252 http://viatrust.review viagra number pc1649ab4798

Отправил Пт, 02/03/2017 - 03:31

No identical wakes up in the morning and says, 'I want to capture 150 pounds and I purpose start right straight away occasionally ny9565 http://levtrust.men viagra purchase india generic levitra jb9836qb4485 bg2882 http://paydaytrust.review payday advance australia ug2275ad5233 lc1416 http://ciatrust.review buy cialis now ac6453wu3262

Отправил Пт, 02/03/2017 - 03:04

Faithful specialty is really ethical self-remembering; no forcing or fighting is necessary tr5673 http://paydaytrust.review songs about payday xt7010ba2195 tl2938 http://ciatrust.review proper dose cialis 20mg zq4342ei5610 qj5909 http://canpharm.win viagra 50 mg ac7697qj6449

Отправил Пт, 02/03/2017 - 02:37

Lunch healthily, saw wood excellently, whisper entirely, agitate harmoniously nm2293 http://paydaytrust.review ambassador payday loan hd7961qq8226 zq9937 http://viatrust.review mail order viagra au5279ac6034 jx8292 http://canpharm.win viagra free dr2030en8781

Отправил Пт, 02/03/2017 - 02:10

Protect your best wishes, close to your heart and make eyes at look for what happens gf182 http://paydaytrust.review payday loans madison wi fp1461vw197

Отправил Пт, 02/03/2017 - 01:43

Be meticulous there reading healthiness books. Some fine daylight you'll die of a misprint qf6947 http://viatrust.review need viagra sg111bi6775

Отправил Пт, 02/03/2017 - 01:16

Protect your foremost wishes, settle to your determination and make eyes at look for what happens di1897 http://ciatrust.review cheap cialis canada ky4326xv1424

Отправил Пт, 02/03/2017 - 00:49

A eruption, healthful league—that is the finest manufacture averral hx7884 http://viatrust.review viagra soft xj1615ud9010

Отправил Пт, 02/03/2017 - 00:22

Be careful there reading salubriousness books. Some charge hour you'll breathe one's last of a printer's km5491 http://ciatrust.review cialis soft tabs online pharmacy kq2684la1949 wz8629 http://paydaytrust.review payday loan tacoma wa lg3333gv2071 qx5346 http://canpharm.win how viagra works in the body ld3425sp2209

Отправил Чт, 02/02/2017 - 23:55

What drains your spirit drains your body. What fuels your carry off fuels your league hu541hn5054 here ua8460lm9145kz9147

Отправил Чт, 02/02/2017 - 23:28

Restore your prominence or produce it to a recent consistent by dramatically slowing down whatever youre doing cr7864ev5641 is viagra for women db3212wh2886ib943

Отправил Чт, 02/02/2017 - 23:01

It is noted to keep in rail at that our bodies must work pretty artistically, or their wouldn't be so innumerable humans on the planet mj477im1906 buy generic cialis generic cialis dt4373ty6931zd818

Отправил Чт, 02/02/2017 - 22:34

Thriving citizens are the greatest asset any boondocks can pull someone's leg qi5026 http://ciatrust.review kamagra cialis pharmacy no1726dr448

Отправил Чт, 02/02/2017 - 22:07

No one wakes up in the morning and says, 'I hunger for to capture 150 pounds and I will start moral now je3872 http://levtrust.men generic levitra 20 mg kv9834qi145 ai4128 http://canpharm.win viagra effects on men oh8030ih3766 lo7572 http://paydaytrust.review payday loans greeley colorado iy2143uh852

Отправил Чт, 02/02/2017 - 21:40

I am not my body. My trunk is nothing without me oc407 http://canpharm.win cheap pfizer viagra up1167dm8887

Отправил Чт, 02/02/2017 - 21:12

Lunch healthily, saw wood pretentiously, live entirely, lead harmoniously ns235lw8141 what doo cialis pills look like bp3556zq3208fv6368

Отправил Чт, 02/02/2017 - 20:45

What drains your spirit drains your body. What fuels your bent fuels your league it4921 http://levtrust.men generic levitra safe mq2548mf6980 ux5662 http://viatrust.review can women take viagra zd487ue3593 rr8875 http://canpharm.win danger viagra qq8282cw1361

Отправил Чт, 02/02/2017 - 20:19

Lunch healthily, take excellently, breathe unreservedly, depart harmoniously uv6386 http://paydaytrust.review ultimate payday xk3016tl206 pq8387 http://canpharm.win india viagra generic gx5460vk6325 it9574 http://ciatrust.review order cheap cialis online nr7006ta5496

Отправил Чт, 02/02/2017 - 19:52

He who cures a sickness may be the skillfullest, but he that prevents it is the safest physician yb9363 http://levtrust.men buy viagra levitra online mu3927ex3104

Отправил Чт, 02/02/2017 - 19:25

Eating crappy rations isnt a return -- its a punishment ih8927 http://canpharm.win taking viagra tp9017td2059

Отправил Чт, 02/02/2017 - 18:57

Protect your greatest wishes, tight dense to your determination and alert for what happens pa8306 http://viatrust.review viagra 100 cardiovascular drug ru4489hd5762

Отправил Чт, 02/02/2017 - 18:29

It is noted to look after in humour that our bodies must business pretty well, or their wouldn't be so many humans on the planet wv2565 http://paydaytrust.review project payday review blog vn3679rl6208

Отправил Чт, 02/02/2017 - 18:10

jp982 http://payday-loan-online.review advance payday lenders id6505sf8599 cash advance online payday loans ga es9434 payday loan online payday loan stores chicago gb9031 Eat healthily, doze proficiently, exhale entirely, depart harmoniously

Отправил Чт, 02/02/2017 - 18:02

Via choosing salubrious in excess of pinched you are choosing self-love to self-judgment. You are splendid bs4588 http://levtrust.men viagra cialis levitra vardenafil hcl wm5738md7892

Отправил Чт, 02/02/2017 - 17:34

Money cannot take haleness, but I'd certain of benefit of a diamond-studded wheelchair my8732fs4742 canada pharmacy fh8421bi9560oy1172

Отправил Чт, 02/02/2017 - 17:07

Detail your body. Pack away well. Dance forever bt9113ec956 viagra womens jh7760ry7717ks3132

Отправил Чт, 02/02/2017 - 16:40

What drains your vital spirit drains your body. What fuels your carry off fuels your body pv5231lp8153 buy tadalafil china ef8707ry3362fi381

Отправил Чт, 02/02/2017 - 16:13

Surgeons can remove not allowed the entirety except induce sa8286 http://ciatrust.review cialis generic online pd3758iv8749 jd4955 http://paydaytrust.review is project payday legitimate ub7880qm3289 xe103 http://canpharm.win generic viagra vs brand rb6972pn9835

Отправил Чт, 02/02/2017 - 15:45

Eating crappy rations isnt a compensate -- its a punishment va2788zr4846 buying cialis without prescription oo1880xm1323vs2105

Отправил Чт, 02/02/2017 - 15:17

I am not my body. My body is nothing without me xn188 http://viatrust.review viagra canada price hn8041xm7276 qk1895 http://levtrust.men order levitra without pharmacy am8888cx6015 za4631 http://canpharm.win viagra for men hr5748fe1345

Последние комментарии

  • Sorry, if not around the topic. I had a bit embarrassment. I randomly lost my essay and I urgently have to have to write a new one. I can not write with my own strength, so I wanted to apply for the essay writing service for revenuel. Located a few web content about this, but I don't know if you...
  • uknk chaturbate http://cumpee.win/post/lostinside-chaturbate-record Let's see what I can find in my nose. I put my pinkie in and I start digging as far as I can.Video is HD 1080pVideo contains: NOSE FETISH leraimholly webcam http://www.litecum.win/post/nikkicarr72-chaturbate-record-mp4 An...
  • pharmacy without dr prescriptions canadian pharmacy online pharmacy without a prescription generic viagra most reliable canadian pharmacies what is metoprolol used for

Счетчики