that's what i'm trying to avoid.
i'm trying to don't mess up the code when i'm having a
lot of source code and a lot of "if"s. I worked like
this before and I had alot of situations when I had to
mess up source code to gain some special
functionalities from that form. The good part of the
frame is that i can write a frame with only one part
of initial form. exemple: make a customer list on the
frame and the buttons with functions wich differ from
form to form will remain on the forms.
Does anyone know how cand I use child MDI and have
another child MDI opened as modal? so that I won't be
able to press anything until I close this window? or
the only solution is to test when i focus another
window and automatically close the current window?
--- [EMAIL PROTECTED] wrote:

> Hi there
>   i suggest that you create a variable that will
> hold the information how
> the button execute his procedure
> 
> ex.
> .......
> public
>   fCmdMode : integer
> end;
> 
> implementation
> 
> procedure Tform1.btnSaveClick(sender:Tobject);
> begin
>   Case  fCmdMode of
>     1: do the process here
>     2: do the process here
>   end;
> 
> end;
> 
> 
> this is how you call the form1 in other form
> 
> var objForm1 : TForm1;
> begin
>   objForm1 := TForm1.Create(self);
>   {change the value of the varaible}
>   objForm1.fCmdMode:=1;
>   .....
>   .....
>   ....
>   ....
> 
> 
> end;
> 
> 
> 
> 
> 
> 
> 
> 
> 
> > I would recommend using a TFrame.
> >
> > --
> >
> > To create a frame, you must use the File|New Frame
> menu option (the
> > Frames component on the Standard tab merely gives
> you access to the list
> > of frames defined in the current project). A frame
> is like a form - you
> > can add components to it in the same way. The
> power comes when you
> > start creating the forms of your application - you
> can drop in a frame
> > into a form, and all the form components are there
> as you defined them
> > in the frame. Except that you can move them and
> change them to suit each
> > frame (but you cannot add components). The frame
> provides a skeleton.
> >  If you change a component in the frame, all forms
> using the frame will
> > have the component changed to suit - the frame
> skeleton dynamically
> > affects the forms based on it.
> > --
> >
> > Myself, I probably would have created a compound
> component esp if its a
> > UI that I would use in multple applications. 
> Frank
> >
> > cerbadan <[EMAIL PROTECTED]> wrote:
> > let's say that I have a form for selecting
> customers.
> >  and I have those situations.
> >  1. I have to use the same form but with diferent
> actions on "ok" button
> >  on the same project.
> >  2. I have to use the same form but with diferent
> actions on "ok" button
> >  on another project.
> >
> >  Wich is the best way to write it, so that I can
> use it verry easy. is
> > it possible to import the form on another project
> and easily rewrite
> > the actions that any buttons on this form are
> doing? can I do it by
> > design? or the only way is to write code, use the
> form as an object not
> >  as a form with design, and override the action
> for the button?
> >
> >
> >
> >              __.
> >
> >
> >
> >
> > ---------------------------------
> > Do you Yahoo!?
> >  Everyone is raving about the  all-new Yahoo! Mail
> Beta.
> >
> > [Non-text portions of this message have been
> removed]
> 
> 
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to