الانتقال الى المشاركة

Primary: Sky Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Secondary: Sky Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Squares Notes Sharp Wood Rockface Leather Honey Vertical Triangles
مرحبا بك في منتديات ابن خلدون التعليمية

أهلا وسهلا بك زائرنا الكريم، و يشرفنا أن تقوم بالتسجيل إذا رغبت بالمشاركة في المنتدى، أما إذا رغبت بقراءة المواضيع والإطلاع فتفضل بزيارة القسم الذي ترغب أدناه.


تسجيل الدخول التسجيل الآن



صورة

كيف تعمل مشروع بدلفي


  • لا تستطيع كتابة موضوع جديد
  • من فضلك قم بتسجيل دخولك لتتمكن من الرد
لا توجد ردود على هذا الموضوع

#1
غير متصل   sabre

sabre

    Advanced Member

  • الأعضاء
  • Pip Pip Pip
  • 42 المشاركات
  • البلد: Country Flag


بسم الله الرحمن الرحيم
الصلاة والسلام رسول الله

كيف تعمل مشروع بدلفي

اليك الكود سورس والمرفق

           unit untpro01;{educarb.com}

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons;{educarb.com}

type
  TForm1 = class(TForm)
    BitBtn1: TBitBtn;{educarb.com}
    BitBtn2: TBitBtn;{educarb.com}
    Label1: TLabel;{educarb.com}
    procedure BitBtn1Click(Sender: TObject);{educarb.com}
  private
    { Déclarations privées }
  public
    { Déclarations publiques }
  end;{educarb.com}

var
  Form1: TForm1;{educarb.com}  {educarb.com}

implementation

uses untMotpass;{educarb.com}

{$R *.dfm}

procedure TForm1.BitBtn1Click(Sender: TObject);{educarb.com}
begin
 PasswordDlg.ShowModal;{educarb.com}
end;{educarb.com}

end.



=========================
=========================
=========================

         unit untCangeMotdepasse;{educarb.com}

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, DBCtrls, DB, StdCtrls, Mask, Buttons;{educarb.com}

type
  TCangeMotdepasse = class(TForm)
    Label1: TLabel;{educarb.com}
    DBEdit1: TDBEdit;{educarb.com}
    DataSource1: TDataSource;{educarb.com}
    DBNavigator1: TDBNavigator;{educarb.com}
    Panel1: TPanel;{educarb.com}
    BitBtn1: TBitBtn;{educarb.com}
    Panel2: TPanel;{educarb.com}
    Edit1: TEdit;{educarb.com}
    BitBtn2: TBitBtn;{educarb.com}
    Label2: TLabel;{educarb.com}
    procedure FormShow(Sender: TObject);{educarb.com}
    procedure BitBtn2Click(Sender: TObject);{educarb.com}
  private
    { Déclarations privées }
  public
    { Déclarations publiques }
  end;{educarb.com}

var
  CangeMotdepasse: TCangeMotdepasse;{educarb.com}

implementation

uses untDataModule;{educarb.com}

{$R *.dfm}

procedure TCangeMotdepasse.FormShow(Sender: TObject);{educarb.com}
begin
DataModule1.Table1.Open;{educarb.com}
panel2.Visible := true;{educarb.com}
end;{educarb.com}

procedure TCangeMotdepasse.BitBtn2Click(Sender: TObject);{educarb.com}
begin
   if Edit1.Text = DataModule1.Table1Mot.Text then
   begin
    panel2.Visible := false;{educarb.com}
    Edit1.Text := '';{educarb.com}
   end else
   begin
    ShowMessage('Mot de pass incourrict');{educarb.com}
    panel2.Visible := true;{educarb.com}
    Edit1.Text := '';{educarb.com}
   end;{educarb.com}
   
end;{educarb.com}

end.




=========================
=========================
=========================

       unit untDataModule;{educarb.com}

interface

uses
  SysUtils, Classes, DB, DBTables;{educarb.com}

type
  TDataModule1 = class(TDataModule)
    Table1: TTable;{educarb.com}
    Table1Mot: TStringField;{educarb.com}
  private
    { Déclarations privées }
  public
    { Déclarations publiques }
  end;{educarb.com}

var
  DataModule1: TDataModule1;{educarb.com}

implementation

{$R *.dfm}

end.




=========================
=========================
=========================

             unit untHome;{educarb.com}

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Menus;{educarb.com}

type
  TForm2 = class(TForm)
    MainMenu1: TMainMenu;{educarb.com}
    file1: TMenuItem;{educarb.com}
    N1: TMenuItem;{educarb.com}
    Exit1: TMenuItem;{educarb.com}
    Outils1: TMenuItem;{educarb.com}
    ChangeMotedepasse1: TMenuItem;{educarb.com}
    Gestiondestock1: TMenuItem;{educarb.com}
    procedure FormClose(Sender: TObject;{educarb.com} var Action: TCloseAction);{educarb.com}
    procedure Exit1Click(Sender: TObject);{educarb.com}
    procedure ChangeMotedepasse1Click(Sender: TObject);{educarb.com}
  private
    { Déclarations privées }
  public
    { Déclarations publiques }
  end;{educarb.com}

var
  Form2: TForm2;{educarb.com}

implementation

uses
   untCangeMotdepasse;{educarb.com}

{$R *.dfm}

procedure TForm2.FormClose(Sender: TObject;{educarb.com} var Action: TCloseAction);{educarb.com}
begin
 Application.Terminate;{educarb.com}
end;{educarb.com}

procedure TForm2.Exit1Click(Sender: TObject);{educarb.com}
begin
close;{educarb.com}
end;{educarb.com}

procedure TForm2.ChangeMotedepasse1Click(Sender: TObject);{educarb.com}
begin
 CangeMotdepasse.ShowModal;{educarb.com}
end;{educarb.com}

end.




=========================
=========================
=========================

          unit untMotpass;{educarb.com}

interface

uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
  Buttons, dialogs;{educarb.com}

type
  TPasswordDlg = class(TForm)
    Label1: TLabel;{educarb.com}
    Password: TEdit;{educarb.com}
    OKBtn: TButton;{educarb.com}
    CancelBtn: TButton;{educarb.com}
    procedure OKBtnClick(Sender: TObject);{educarb.com}
  private
    { déclarations privées }
  public
    { déclarations publiques }
  end;{educarb.com}

var
  PasswordDlg: TPasswordDlg;{educarb.com}

implementation

uses untHome, untpro01, untDataModule;{educarb.com}

{$R *.dfm}

procedure TPasswordDlg.OKBtnClick(Sender: TObject);{educarb.com}
begin
 with DataModule1.Table1 do
 begin
 open;{educarb.com} first;{educarb.com}
 if Password.Text = fieldbyname('Mot').AsString then
 begin
   form2.Show;{educarb.com}
   PasswordDlg.Hide;{educarb.com}
   Form1.hide;{educarb.com}
 end
 else
   ShowMessage('Mot de pass incourrict');{educarb.com}
 Password.Text := '';{educarb.com}
 close;{educarb.com}
 end;{educarb.com}
end;{educarb.com}

end.




=========================
=========================
=========================

 

:D

دلفي تعليم

http://delph.forumalgerie.net

 





عدد المتواجدون الآن فى الموضوع : 0

0 الأعضاء, 0 الزوار, 0 الأعضاء المجهولين