2. Зміст
Завдання 1. Ефект збільшення
Завдання 2. Перетворення
Завдання 3. Малюнок із ліній
Завдання 4. Стовпчаста діаграма
Завдання 5. Бульбашкова діаграма (с.р.)
Завдання 6. Полюси магнітів
Завдання 7. Кошеня (*)
Завдання 8. Площа фігур
Завдання 9. Прямокутник
Завдання 10. Енціклопедія(*)
Завдання 11. Пелюстки
Завдання 12. Гра(*)
Завдання 13. Рух
Завдання 14. Графічний редактор (*)
Завдання 15. Креслення
3. Завдання 1
Розробіть проект, форма якого містить
малюнок, що збережений у файлі
писанка.jpg у папці Графіка. При
натисненні кнопки Збільшення
розміри малюнка збільшуються
(імітується ефект наближення)
6. Завдання 2
Розробіть проект, у якому, коли за клацають мишею
на зображенні круга, він зафарбовується в колір,
обраний у групі перемикачів Колір, а коли
клацають на зображенні прямокутника, - він
зафарбовується обраним кольором та
застосовується стиль заливки, який обирається у
групі Заливка
10. Завдання 2
procedure
TForm1.Shape1MouseDown(Sende
r: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if radiogroup1.ItemIndex=0 then
Shape1.brush.color:=clred;
if radiogroup1.ItemIndex=1 then
Shape1.brush.color:=clblue;
if radiogroup1.ItemIndex=2 then
Shape1.brush.color:=clgreen;
end;
procedure TForm1.Shape2MouseDown(Sender:
TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if radiogroup1.ItemIndex=0 then
Shape2.brush.color:=clred;
if radiogroup1.ItemIndex=1 then
Shape2.brush.color:=clblue;
if radiogroup1.ItemIndex=2 then
Shape2.brush.color:=clgreen;
if radiogroup2.ItemIndex=0 then
Shape2.brush.style:=bscross;
if radiogroup2.ItemIndex=1 then
Shape2.brush.style:=bshorizontal;
if radiogroup2.ItemIndex=2 then
Shape2.brush.style:=bsfdiagonal;
end;
13. Завдання 4
Розробіть проект, у якому у вікні головної
форми буде побудована стовпчаста
діаграма, що демонструє співвідношення
між числами 15, 50, 70, 25, 10, 30.
14. Завдання 4
procedure TForm1.Button1Click(Sender: TObject);
begin
form1.Canvas.Pen.Color:=clgreen;
form1.Canvas.Line(150,100,250,100);
form1.Canvas.Brush.Color:=clblue;
form1.Canvas.Rectangle(155,100,165,100-15);
form1.Canvas.Rectangle(170,100,180,100-50);
form1.Canvas.Rectangle(185,100,195,100-70);
form1.Canvas.Rectangle(200,100,210,100-25);
form1.Canvas.Rectangle(215,100,225,100-10);
form1.Canvas.Rectangle(230,100,240,100-30);
end;
15. Завдання 5 (самостійно)
Розробіть проект, у якому у вікні головної форми
буде побудована бульбашкова діаграма, що
демонструє співвідношення між числами 15, 50,
70, 25, 10, 30
form1.Canvas.Ellipse(50,100,50+15,100-15);
form1.Canvas.Ellipse(150,100,150+50,100-50);
21. Завдання 7
var
flag:integer;
…
procedure TForm1.Button1Click(Sender: TObject);
begin
Timer1.Interval:=300; timer1.Enabled:=true; flag:=1; {таймер включено, інтервал=300, змінна для вибору
малюнка=1}
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
case flag of {на кожний крок таймера обирається наступний малюнок}
1:Image7.Picture:=Image1.Picture;
2:Image7.Picture:=Image2.Picture;
3:Image7.Picture:=Image3.Picture;
4:Image7.Picture:=Image4.Picture;
5:Image7.Picture:=Image5.Picture;
6:Image7.Picture:=Image6.Picture;
end;
flag:=flag+1;
if flag=7 then flag:=1;
end;
32. Завдання 10
procedure TForm1.Button1Click(Sender: TObject);
begin
if radiogroup1.ItemIndex=0 then k:=0 else k:=1;
Case combobox1.ItemIndex of
0: begin
if k=0 then
begin
memo1.visible:=false;
image1.Picture.LoadFromFile('c:/marina/8 klass/lazarus/oko.jpg');
image1.visible:=true;
end
else
begin
Memo1.Lines.LoadFromFile ('c:/marina/8 klass/lazarus/oko.txt');
memo1.visible:=true
end;
end;… end; end;
1: uho
2: nis
3:vestib
4: ruh
5: dotuk
6: temp
7: bil
маршрут
34. Завдання 11
var
x1,x2,y1,y2:integer; …..
procedure TForm1.Button1Click(Sender: TObject);
begin
randomize;
x1:=random(200)+150; y1:=random(200)+50;
if radiogroup1.ItemIndex=0 then begin x2:=x1+300;y2:=y1+300;end
else if radiogroup1.ItemIndex=1 then begin x2:=x1+200; y2:=y1+200; end
else begin x2:=x1+100;y2:=y1+100; end;
form1.Canvas.Brush.Color:=clred;
form1.canvas.Pie(x1,y1,x2,y2,x1+2*(x2-x1) div 3, y1,x1+(x2-x1)div 3,y1 );
form1.canvas.Pie(x1,y1,x2,y2,x1,y1+(y2-y1) div 4, x1,y1+2*(y2-y1) div 4);
form1.canvas.Pie(x1,y1,x2,y2,x1,y1+3*(y2-y1) div 4, x1+(x2-x1)div 3, y2);
form1.canvas.Pie(x1,y1,x2,y2,x1+2*(x2-x1)div 3,y2, x2,y1+3*(y2-y1) div 4);
form1.canvas.Pie(x1,y1,x2,y2,x2,y1+2*(y2-y1) div 4,x2,y1+(y2-y1) div 4);
end;
35. Завдання 12
У прикладі заховано 3 пари ромбів, фігури не вилітають,а ховаються
(самостійно доопрацювати проект)
37. procedure TForm1.Panel1Click(Sender: TObject);
begin
shape1.visible:=true;
case n of
1: begin shape1.Visible:=false;end;
2: begin shape2.Visible:=false;end;
3: begin shape3.Visible:=false;end;
4: begin shape4.Visible:=false;end;
5: begin shape5.Visible:=false;end;
6: begin shape6.Visible:=false;end;
end;
k:=k+1;
if k=2 then
begin
col2:=shape1.Brush.Color; k:=0;
if col1=col2 then
begin
panel1.color:=clwhite; shape1.Visible:=false;
case n of
1: begin
panel1.color:=clwhite;shape1.Visible:=false;end;
2: begin
panel2.color:=clwhite;shape2.Visible:=false;end;
3: begin
panel3.color:=clwhite;shape3.Visible:=false;end;
4: begin
panel4.color:=clwhite;shape4.Visible:=false;end;
5: begin
panel5.color:=clwhite;shape5.Visible:=false;end;
6: begin
panel6.color:=clwhite;shape6.Visible:=false;end;
end;
end;
end
else begin col1:=shape1.Brush.Color; ;end; n:=1
end;
procedure TForm1.Panel2Click(Sender: TObject);
begin
shape2.visible:=true;
case n of
1: begin shape1.Visible:=false;end;
2: begin shape2.Visible:=false;end;
3: begin shape3.Visible:=false;end;
4: begin shape4.Visible:=false;end;
5: begin shape5.Visible:=false;end;
6: begin shape6.Visible:=false;end;
end;
k:=k+1;
if k=2 then
begin
col2:=shape2.Brush.Color; k:=0;
if col1=col2 then
begin
panel2.color:=clwhite; shape2.Visible:=false;;
case n of
1: begin
panel1.color:=clwhite;shape1.Visible:=false;end;
2: begin
panel2.color:=clwhite;shape2.Visible:=false;end;
3: begin
panel3.color:=clwhite;shape3.Visible:=false;end;
4: begin
panel4.color:=clwhite;shape4.Visible:=false;end;
5: begin
panel5.color:=clwhite;shape5.Visible:=false;end;
6: begin
panel6.color:=clwhite;shape6.Visible:=false;end;
end;
end;
end
else begin col1:=shape2.Brush.Color; ;end; n:=2
end;
44. Завдання 14
if checkbox1.Checked = true then
begin
shape1.shape:=stcircle;
shape2.shape:=stcircle;
shape3.shape:=stcircle;
shape4.shape:=stcircle;
shape5.shape:=stcircle;
end; …
if radiogroup1.ItemIndex=0 then
begin
shape1.brush.color:=clred;
shape2.brush.color:=clred;
shape3.brush.color:=clred;
shape4.brush.color:=clred;
shape5.brush.color:=clred;
end; ….
if radiogroup2.ItemIndex=0 then
begin
shape1.brush.style:=bsSolid;
shape2.brush.style:=bsSolid;
shape3.brush.style:=bsSolid;
shape4.brush.style:=bsSolid;
shape5.brush.style:=bsSolid;
end; …
x:=strtoint(edit1.text)+250;
y:=strtoint(edit2.text)+100;
shape1.left:=x;
shape1.top:=y;
shape2.top:=y;
shape3.top:=y;
shape4.top:=y;
shape5.top:=y;
randomize;
k:=random(4)+1;
kr:=random(40)+10; ;
for i:=1 to k do
begin
case i of
1:begin shape1.left:=x+i*kr;shape1.Visible:=true;end;
2:begin shape2.left:=x+i*kr;shape2.Visible:=true;end;
3:begin shape3.left:=x+i*kr;shape3.Visible:=true;end;
4:begin shape4.left:=x+i*kr;shape4.Visible:=true;end;
5:begin shape5.left:=x+i*kr;shape5.Visible:=true;end;
end;
end;
47. Джерела
1. Морзе Н.В., Барна О.В., Вембер В.П. Інформатика.підручник для 8
класу загальноосвітніх навчальних закладів. – К.:Оріон, 2016.
2. http://intuit.valrkl.ru/course-1265/index.html#ID.3.section.4 –
Программирование на Lazarus. Ачкасов Вячеслав Юрьевич
3. Лисенко Т.С., Ривкінд Й.Я., Чернікова Л.А., Шакотько В.В.
Інформатика. Академічний рівень, профільний рівень. – К: Ґенеза,
2011.
4. Вовк Т. В. Готуємось до ДПА з інформатики. На допомогу вчителю
та учням. - Днвпропетрівськ, 2011.
5. Бондаренко О.О. Інформатика. Visual Basic. 9 клас. – Шепетівка:
ПП Шестопалов, 2009.
6. Дудзяний І. М. Програмування мовою Visual Basic/VBA. - Львів:
Видавничий центр ЛНУ імені Івані Франка, 2004
7. http://visualbasic.at.ua/ - Початковий курс програмування Visual
Basic
8. http://urokinfo.ho.ua/view_post.php?id=146 - Iнформатика в школі.
Матеріали до уроків
1. Морзе Н.В., Барна О.В., Вембер В.П. Інформатика.підручник для 8
класу загальноосвітніх навчальних закладів. – К.:Оріон, 2016.
2. http://intuit.valrkl.ru/course-1265/index.html#ID.3.section.4 –
Программирование на Lazarus. Ачкасов Вячеслав Юрьевич
3. Лисенко Т.С., Ривкінд Й.Я., Чернікова Л.А., Шакотько В.В. Інформатика.
Академічний рівень, профільний рівень. – К: Ґенеза, 2011.
4. Вовк Т. В. Готуємось до ДПА з інформатики. На допомогу вчителю та
учням. - Днвпропетрівськ, 2011.
5. Бондаренко О.О. Інформатика. Visual Basic. 9 клас. – Шепетівка: ПП
Шестопалов, 2009.
6. Дудзяний І. М. Програмування мовою Visual Basic/VBA. - Львів:
Видавничий центр ЛНУ імені Івані Франка, 2004
7. http://visualbasic.at.ua/ - Початковий курс програмування Visual Basic
8. http://urokinfo.ho.ua/view_post.php?id=146 - Iнформатика в школі.
Матеріали до уроків