Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

question for shane and a note

Posted on 2004-04-23
2
Medium Priority
?
175 Views
Last Modified: 2010-04-05

well i know you are busy and that you do really care that
i have just started delphi and i would like to use persons help who is more experienced and has worked on a lot of things

i belive in finishing stuff and that is not finished

well if you don't want to continuing with this to the finish line

that's up to you

sometimes you got to give people time when they doing stuff for the first time

anyway i really appreciate that you helped me i tried to learn stuff

which i belive i did and thank you
0
Comment
Question by:magma_george
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Author Comment

by:magma_george
ID: 10904488
i am online
0
 
LVL 11

Accepted Solution

by:
shaneholmes earned 2000 total points
ID: 10904914
unit UntDataMod;

interface

uses
  Forms, SysUtils, Classes, DB, ADODB;

type
  TfrmDataMod = class(TDataModule)
    dbMain: TADOConnection;
    tblPeople: TADOTable;
    tblAnimals: TADOTable;
    dsPeople: TDataSource;
    dsAnimals: TDataSource;
    procedure DataModuleCreate(Sender: TObject);
    procedure DataModuleDestroy(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmDataMod: TfrmDataMod;

implementation

{$R *.dfm}

procedure TfrmDataMod.DataModuleCreate(Sender: TObject);
begin
 dbMain.ConnectionString:= 'Provider=Microsoft.Jet.OLEDB.4.0;' +
                           'Data Source=' + ChangeFileExt(Application.ExeName,'.mdb')  + ';' +
                           'Persist Security Info=False';
 try
  dbMain.Connected:= true;
  tblPeople.Active:= True;
  tblAnimals.Active:= True;
 except
 end;
end;

procedure TfrmDataMod.DataModuleDestroy(Sender: TObject);
begin
 tblAnimals.Active:= False;
 tblPeople.Active:= False;
 dbMain.Connected:= False;
end;

end.

_____________________________________________________________________


unit UntMain;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

uses Unit2, Unit3;

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
 frmPeople.show;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  frmAnimals.show;
end;

end.

__________________________________________________

unit Unit2;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, DBCtrls, Grids, DBGrids, Buttons;

type
  TfrmPeople = class(TForm)
    DBGrid1: TDBGrid;
    DBNavigator1: TDBNavigator;
    procedure FormActivate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmPeople: TfrmPeople;

implementation

uses UntDataMod;

{$R *.dfm}

procedure TfrmPeople.FormActivate(Sender: TObject);
var I: Integer;
begin
with DBNavigator1 do
for I := 0 to ControlCount -1 do
 if Controls[I] is TNavButton then
  with TNavButton(Controls[I]) do
  begin
   Glyph := nil;
   Font.Style := [fsBold];
   Layout:= blGlyphTop;
   case TNavigateBtn(I) of
    nbInsert :begin
               Caption := 'Add';
               Glyph.LoadFromResourceName(HInstance, 'ADD');
              end;
    nbDelete : begin
                Caption := 'Delete';
                Glyph.LoadFromResourceName(HInstance, 'DELETE');
               end;

     nbPost   :begin
                Caption := 'Post';
                Glyph.LoadFromResourceName(HInstance, 'POST');
               end;
     nbCancel :begin
                Caption := 'Cancel';
                Glyph.LoadFromResourceName(HInstance, 'CANCEL');
               end;
     nbFirst :begin
               Caption := 'First';
               Glyph.LoadFromResourceName(HInstance, 'FIRST');
              end;
     nbLast :begin
               Caption := 'Last';
               Glyph.LoadFromResourceName(HInstance, 'LAST');
              end;
     nbNext :begin
               Caption := 'Next';
               Glyph.LoadFromResourceName(HInstance, 'NEXT');
              end;
     end;
  end;
end;

end.

_______________________________________________________________

unit Unit3;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Grids, DBGrids, ExtCtrls, DBCtrls, Buttons;

type
  TfrmAnimals = class(TForm)
    DBNavigator1: TDBNavigator;
    DBGrid1: TDBGrid;
    procedure FormActivate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmAnimals: TfrmAnimals;

implementation

uses UntDataMod;

{$R *.dfm}

procedure TfrmAnimals.FormActivate(Sender: TObject);
var I: Integer;
begin
with DBNavigator1 do
for I := 0 to ControlCount -1 do
 if Controls[I] is TNavButton then
  with TNavButton(Controls[I]) do
  begin
   Glyph := nil;
   Font.Style := [fsBold];
   Layout:= blGlyphTop;
   case TNavigateBtn(I) of
    nbInsert :begin
               Caption := 'Add';
               Glyph.LoadFromResourceName(HInstance, 'ADD');
              end;
    nbDelete : begin
                Caption := 'Delete';
                Glyph.LoadFromResourceName(HInstance, 'DELETE');
               end;

     nbPost   :begin
                Caption := 'Post';
                Glyph.LoadFromResourceName(HInstance, 'POST');
               end;
     nbCancel :begin
                Caption := 'Cancel';
                Glyph.LoadFromResourceName(HInstance, 'CANCEL');
               end;
     nbFirst :begin
               Caption := 'First';
               Glyph.LoadFromResourceName(HInstance, 'FIRST');
              end;
     nbLast :begin
               Caption := 'Last';
               Glyph.LoadFromResourceName(HInstance, 'LAST');
              end;
     nbNext :begin
               Caption := 'Next';
               Glyph.LoadFromResourceName(HInstance, 'NEXT');
              end;
     end;
  end;
end;

end.

0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question