Delphi Dünyası Facebook'ta

Kodbank İndir

! CODEBANK 2012 !

İNDİRMEK&DETAYLI BİLGİ ALMAK İÇİN BURAYI TIKLAYINIZ.

Gönderen Konu: Renkli hata formu .....  (Okunma sayısı 2744 defa)

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

muderless

  • Ziyaretçi
Renkli hata formu .....
« : 26 Kasım 2005 01:48:57 »
Kod:  (Unknown Language)
  1. procedure TForm1.Button1Click(Sender: TObject);
  2. begin
  3. with CreateMessageDialog('Excel Export İşlemi Tamamlandı',mtINFORMATION, [mbyes,mbno])do
  4.   try
  5.     Caption := 'İşlem Sonu';
  6.     Color := $00BFC4EA;
  7.     ShowModal;
  8.   finally
  9.     application.Terminate;
  10.  
  11. end;
  12.         end;
« Son Düzenleme: 19 Haziran 2009 02:13:05 by Kocaturk »

Çevrimdışı Emre

  • Global Moderatör
  • *****
  • İleti: 74
  • Rep: +6/-0
Ynt: Renkli hata formu .....
« Yanıtla #1 : 26 Kasım 2005 09:58:38 »
Çok güzel bir örnek. Mesaj penceresini özelleştirebilme imkanı veriyor bize. Paylaşımın için teşekkürler. Ben bunu bir prosedür haline getirdim ve parametrik bir hale soktum. Kodu sizlerle paylaşmak istiyorum:
Kod:  (Unknown Language)
  1. procedure TForm1.Mesaj(const Mesaj, MesajBasligi: string; MesajTipi: TMsgDlgType;
  2.                                    Buttons: TMsgDlgButtons; const Renk, Font_Rengi: TColor;
  3.                                    Kalin_Font: boolean);
  4. begin
  5.    with CreateMessageDialog(Mesaj , MesajTipi, Buttons) do
  6.       begin
  7.          Caption := MesajBasligi;
  8.          Color := Renk;
  9.          Font.Color := Font_Rengi;
  10.          if Kalin_Font = True then
  11.             Font.Style := [fsBold];
  12.  
  13.          if mbYes in Buttons then
  14.             (FindComponent('YES') as TButton).Caption := 'EVET';
  15.          if mbNo in Buttons then
  16.             (FindComponent('NO') as TButton) .Caption := 'HAYIR';
  17.          if mbOK in Buttons then
  18.             (FindComponent('OK') as TButton) .Caption := 'TAMAM';
  19.          if mbCANCEL in Buttons then
  20.             (FindComponent('CANCEL') as TButton) .Caption := 'İPTAL';
  21.          if mbABORT in Buttons then
  22.             (FindComponent('ABORT') as TButton) .Caption := 'SONLANDIR';
  23.          if mbRETRY in Buttons then
  24.             (FindComponent('RETRY') as TButton) .Caption := 'TEKRAR DENE';
  25.          if mbIGNORE in Buttons then
  26.             (FindComponent('IGNORE') as TButton) .Caption := 'YOKSAY';
  27.          if mbAll in Buttons then
  28.             (FindComponent('ALL') as TButton) .Caption := 'HEPSİ';
  29.          if mbNoToAll in Buttons then
  30.             (FindComponent('NOTOALL') as TButton) .Caption := 'HEPSİNE HAYIR';
  31.          if mbYesToAll in Buttons then
  32.             (FindComponent('YESTOALL') as TButton) .Caption := 'HEPSİNE EVET';
  33.          if mbHELP in Buttons then
  34.             (FindComponent('HELP') as TButton) .Caption := 'YARDIM';
  35.  
  36.          ShowModal;
  37.          Free;
  38.       end;
  39. end;

Kullanımı ise:
Kod:  (Unknown Language)
  1. procedure TForm1.Button1Click(Sender: TObject);
  2. begin
  3.    Mesaj('Özelleştirilmiş mesaj kutusu', 'www.delphidunyasi.com', mtInformation, [mbOK], $00FF8000, clWhite, True);
  4. end;

« Son Düzenleme: 19 Haziran 2009 02:14:56 by Kocaturk »

muderless

  • Ziyaretçi
Ynt: Renkli hata formu .....( acemileride düşünelim...)
« Yanıtla #2 : 28 Kasım 2005 18:06:41 »
Kod:  (Unknown Language)
  1. unit Unit1;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  7.   Dialogs, StdCtrls;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     Button1: TButton;
  12.     procedure Button1Click(Sender: TObject);
  13.     procedure Mesaj(const Mesaj, MesajBasligi: string; MesajTipi: TMsgDlgType;
  14.                        Buttons: TMsgDlgButtons; const Renk, Font_Rengi: TColor;
  15.                        Kalin_Font: boolean);
  16.   private
  17.     { Private declarations }
  18.  
  19.   public
  20.     { Public declarations }
  21.   end;
  22.  
  23. var
  24.   Form1: TForm1;
  25.  
  26. implementation
  27.  
  28. {$R *.dfm}
  29. procedure TForm1.Mesaj(const Mesaj, MesajBasligi: string; MesajTipi: TMsgDlgType;
  30.                        Buttons: TMsgDlgButtons; const Renk, Font_Rengi: TColor;
  31.                        Kalin_Font: boolean);
  32. begin
  33.   with CreateMessageDialog(Mesaj , MesajTipi, Buttons) do
  34.     begin
  35.       Caption := MesajBasligi;
  36.       Color := Renk;
  37.       Font.Color := Font_Rengi;
  38.       if Kalin_Font = True then
  39.         Font.Style := [fsBold];
  40.  
  41.       if mbYes in Buttons then
  42.         (FindComponent('YES') as TButton).Caption := 'EVET';
  43.       if mbNo in Buttons then
  44.         (FindComponent('NO') as TButton) .Caption := 'HAYIR';
  45.       if mbOK in Buttons then
  46.         (FindComponent('OK') as TButton) .Caption := 'TAMAM';
  47.       if mbCANCEL in Buttons then
  48.         (FindComponent('CANCEL') as TButton) .Caption := 'İPTAL';
  49.       if mbABORT in Buttons then
  50.         (FindComponent('ABORT') as TButton) .Caption := 'SONLANDIR';
  51.       if mbRETRY in Buttons then
  52.         (FindComponent('RETRY') as TButton) .Caption := 'TEKRAR DENE';
  53.       if mbIGNORE in Buttons then
  54.         (FindComponent('IGNORE') as TButton) .Caption := 'YOKSAY';
  55.       if mbAll in Buttons then
  56.         (FindComponent('ALL') as TButton) .Caption := 'HEPSİ';
  57.       if mbNoToAll in Buttons then
  58.         (FindComponent('NOTOALL') as TButton) .Caption := 'HEPSİNE HAYIR';
  59.       if mbYesToAll in Buttons then
  60.         (FindComponent('YESTOALL') as TButton) .Caption := 'HEPSİNE EVET';
  61.       if mbHELP in Buttons then
  62.         (FindComponent('HELP') as TButton) .Caption := 'YARDIM';
  63.  
  64.       ShowModal;
  65.       Free;
  66.     end;
  67. end;
  68.  
  69. procedure TForm1.Button1Click(Sender: TObject);
  70. begin
  71. Mesaj('Özelleştirilmiş mesaj kutusu', 'www.delphidunyasi.com', mtInformation, [mbOK], $00FF8000, clWhite, True);
  72. end;
  73.  
  74. end.
  75.  
« Son Düzenleme: 19 Haziran 2009 02:11:59 by Kocaturk »

Çevrimdışı sessizgece

  • Delphi 1 Level 1
  • *
  • İleti: 5
  • Rep: +0/-0
Ynt: Renkli hata formu .....
« Yanıtla #3 : 12 Nisan 2006 00:18:42 »
kardeşler iyi de ben en üsttekini yapamadım yazdım hata en altta end te çıkıyo 
biri bana msn den yardımcı olabilirmiii

gokhankoc90@hotmail.com

Çevrimdışı shinysulis

  • Delphi 1 Level 1
  • *
  • İleti: 4
  • Rep: +0/-0
Ynt: Renkli hata formu .....
« Yanıtla #4 : 10 Ocak 2011 22:27:40 »
o end in altına bir tane daha end; ekle