
Function la Tablaya bağlantı
Kod: Tümünü seç
Function TabloyaBaglan(QueryAdi,SQL,Tip:String):Boolean;
Var
I : Integer;
Begin
for I:=0 to Form1.ComponentCount-1 do
if (Form1.Components[I] is TADOQuery) then
If (Form1.Components[i] as TAdoQuery).Name=QueryAdi Then
begin
(Form1.Components[i] as TAdoQuery).Close;
(Form1.Components[i] as TAdoQuery).SQL.Clear;
(Form1.Components[i] as TAdoQuery).SQL.Add(SQL);
try
If AdoConnection1.Connected=False Then
AdoConnection1.Connected:=True;
except
end;
If Tip='Open' Then (Form1.Components[i] as TAdoQuery).Open
If Tip='ExecSQL' Then (Form1.Components[i] as TAdoQuery).ExecSQL;
End;
End;
//Kullanımı : TabloyaBaglan('AdoQuery1' , 'Select* From Urunler' , 'Open');
//Kullanımı : TabloyaBaglan('AdoQuery1' , 'Delete From Urunler Where UrunNo=25' , 'ExecSQL'); .... gibi
Procedure le ilk harf büyük
Kod: Tümünü seç
var
KucukMetin : String;
Procedure IlkHarfBuyuk(Kelime:String);
var
IlkHarf,Metin:AnsiString;
begin
KucukMetin:='';
IlkHarf :=AnsiLeftStr(Kelime, 1);
IlkHarf :=AnsiReplaceStr(IlkHarf, 'i' , 'İ');
IlkHarf :=AnsiReplaceStr(IlkHarf, 'ı' , 'I');
IlkHarf :=AnsiUpperCase(IlkHarf);
Kelime :=AnsiReplaceStr(Kelime, 'İ' , 'i');
Kelime :=AnsiReplaceStr(Kelime, 'I' , 'ı');
Kelime :=AnsiLowerCase(Kelime);
Metin :=Copy(Kelime, 2 , Length(Kelime) );
KucukMetin:=IlkHarf+Metin;
end;
//Kullanımı : Edit1.Text:=IlkHarfBuyuk(Edit1.Text);
ShowMessage kullanmayın !...
Kod: Tümünü seç
Var
MSNNo : Integer;
Procedure MesajVer(Mesajimiz:string);
Var
MSNPencere : TsuiMSNPopForm;
Begin
Try
MSNPencere := TsuiMSNPopForm.Create(Form1);
MSNPencere.Name := 'MSN'+IntToStr(MSNNo);
MSNPencere.Title := 'Bilgi ! ...';
MSNPencere.MessageText := Mesajimiz;
MSNPencere.AnimateTime := 500;
MSNPencere.StayTime := 4000;
MSNPencere.PositionX := 0;
MSNPencere.PositionY := 0;
MSNPencere.AutoPosition := True;
MSNPencere.ClickHide := True;
MSNPencere.TitleFont.Name := 'Tahoma';
MSNPencere.MessageFont.Name := 'Tahoma';
MSNNo:=MSNNo+1;
MSNPencere.Popup;
Except
End;
end;
//Kullanımı : MesajVer('www.enderaRslanturk.com.tr sunar... :) ');
Sevgi ve saygılarımla, Allaha emanet olun !...
Ender ARSLANTÜRK
http://www.enderaRslanturk.com.tr