Bu ders de Delphi Boyut ve Ağırlığa Göre Resim Ayarlama konusunda örnek kod vereceğiz.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
| procedure TForm1.FormCreate(Sender: TObject);vars:string;i:byte;beginQuery1.DatabaseName:='dbdemos';DataSource1.DataSet:=Query1;DBGrid1.DataSource:=DataSource1;Query1.SQL.Clear;Query1.SQL.Add('select*from ANIMALS A');Query1.SQL.Add('where A."SIZE">:BOY AND');Query1.SQL.Add('A."WEIGHT">:KILO');DBImage1.DataSource:=DataSource1;DBImage1.DataField:='BMP';for i:=0 to 21 dobegins:=IntToStr(i*2);ListBox1.Items.Add(s);ListBox2.Items.Add(s);end;ListBox1.ItemIndex:=0;ListBox2.ItemIndex:=0;end;procedure TForm1.LISTBOXTIKLA(Sender: TObject);beginQuery1.Close;Query1.Prepare;Query1.Params[0].AsInteger:=StrToInt(ListBox1.Items.Strings[ListBox1.itemindex]);Query1.Params[1].AsInteger:=StrToInt(ListBox2.Items.Strings[ListBox2.itemindex]); Query1.Open;end;end. |

Hiç yorum yok:
Yorum Gönder