Anasayfa / Delphi (Sayfa 5)

Delphi

delphi

Delphi Tuş Kodları

Delphi Tuş Kodları Sabit sembolik isim Heksadesimal Karşılığı VK_LBUTTON 1 Sol fare tuşu VK_RBUTTON 2 Sağ fare tuşu VK_CANCEL 3 Control-break işlemi VK_MBUTTON 4 Orta fare tuşu (3 tuşlu fareler için) VK_BACK 8 BACKSPACE tuşu VK_TAB 9 TAB tuşu VK_CLEAR 0C CLEAR tuşu VK_RETURN 0D ENTER tuşu VK_SHIFT 10 SHIFT …

Devamını Oku »

Delphi iskonto bulma

Örnek Resimde Olduğu verilen bir tutar üzerinden gerçekleştirilen 4 iskonto oranı girilerek bu ürünün tutarsal olarak değeri ve bu girilen oranların tek bir iskonto oranını bulabiliyoruz. procedure Tfrm_iskontooranibul.btn_bulClick(Sender: TObject); var bir,iki,uc,dort:Double; begin bir:=StrToFloatDef(edt_tutar.Text,0)-StrToFloatDef(edt_tutar.Text,0)*StrToFloatDef(edt_isk1.Text,0)/100; edt_1.Text:=(FloatToStr(bir)); iki:=StrToFloatDef(edt_1.Text,0)-StrToFloatDef(edt_1.Text,0)*StrToFloatDef(edt_isk2.Text,0)/100; edt_2.Text:=(FloatToStr(iki)); uc:=StrToFloatDef(edt_2.Text,0)-StrToFloatDef(edt_2.Text,0)*StrToFloatDef(edt_isk3.Text,0)/100; edt_3.Text:=(FloatToStr(uc)); dort:=StrToFloatdef(edt_3.Text,0)-StrToFloat(edt_3.Text)*StrToFloatDef(edt_isk4.Text,0)/100; edt_4.Text:=(FloatToStr(dort)); edt_iskontoorani.Text:=FloatToStr(StrToFloat(edt_tutar.Text)-StrToFloat(edt_4.Text)); end; Kaynak kod ve exe için Tıklayın.

Devamını Oku »

Firebird seminerleri

Delphi Türkiye  Sayın Adnan Öncevarlık hocamızın sunumunu yaptığı firebird sql veritabanı seminerleri 01) Firebird.conf Ayarları-(02.10.2013) 01:54 dk.-137 MB 02) İndexler-(08.10.2013)-01:23 dk.-232 MB 03) View-StoredProcedure-Trigger(29.10.2013)01:14 dk. – 297 MB 04) Constraints-(12.11.2013)-35 dk. – 77,9 MB 05) Foreign Key-(19.11.2013)-56 dk. – 101 MB 06) Transaction-DeadLock-I -(26.11.2013) – 49 dk. – 126 MB 07) Transaction-DeadLock-II – …

Devamını Oku »

Delphi dbgrid enter tab

Delphi Dbgrid üzerinde iken enter tuşuna basınca tab tuşuna basılmış gibi sonraki column a geçme kodu. procedure Tfrm_fatura.DBGrid1KeyPress(Sender: TObject; var Key: Char); begin if Key = #13 then if DBGrid1.Columns.Grid.SelectedIndex < DBGrid1.Columns.Count - 1 then DBGrid1.Columns[DBGrid1.Columns.grid.SelectedIndex + 1].Field.FocusControl else begin DBGrid1.Columns[0].field.FocusControl; end;

Devamını Oku »

Delphi Varsayılan Yazıcı Ayarlamak

Usesa  Printers ekliyoruz fonksiyonumuz function GetDefaultPrinter: string; var ResStr: array[0..255] of Char; begin GetProfileString('Windows', 'device', '', ResStr, 255); Result := StrPas(ResStr); end; procedure SetDefaultPrinter(NewDefPrinter: string); var ResStr: array[0..255] of Char; begin StrPCopy(ResStr, NewdefPrinter); WriteProfileString('windows', 'device', ResStr); StrCopy(ResStr, 'windows'); SendMessage(HWND_BROADCAST, WM_WININICHANGE, 0, Longint(@ResStr)); end; procedure TfrmMain.FormCreate(Sender: TObject); begin //Fill the combobox …

Devamını Oku »

Delphi RichEdit Bul değiştir Search and replace text in a RichEdit

function Search_And_Replace(RichEdit: TRichEdit; SearchText, ReplaceText: string): boolean; var startpos, position, endpos: integer; begin startpos := 0; with RichEdit do begin endpos := Length(RichEdit.Text); Lines.BeginUpdate; while FindText(SearchText, startpos, endpos, [stMatchCase])<>-1 do begin endpos := Length(RichEdit.Text) - startpos; position := FindText(SearchText, startpos, endpos, [stMatchCase]); Inc(startpos, Length(SearchText)); SetFocus; SelStart := position; SelLength := …

Devamını Oku »