?
Solved

MDI Style application (Simulating Modal form by process)

Posted on 2003-03-30
4
Medium Priority
?
141 Views
Last Modified: 2010-04-04
This is what I want to do.

I have an MDI Style app, The processes are 'Orders', 'Customers'. these are two mdi child forms that have a details of orders, customers.  Each one have Add, Modify

What I want is If yo click Add in orders, display the Add orders Child form on top of Orders form i dont permits to focus the order form until the add work is done. But it permits to open the Customer form without problems. ('The same for customers')
0
Comment
Question by:jose_suero
[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
4 Comments
 
LVL 9

Accepted Solution

by:
mocarts earned 300 total points
ID: 8233417
// in list form of Orders (and Customers)
TfrmOrders.btnAddDetailsClick(Sender: TObject);
begin
  // passing to constructor Owner i.e. frmOrders
  with TfrmOrderDetails.Create(Self) do
    Show;
end;

// in details form
TfrmOrderDetails.FormShow(Sender: TObject);
begin
  // taking forms owner (in orders case this will be Order
  // list form, as we passed it as owner) and disabling it
  EnableWindow(TForm(Owner).Handle, False);
end;

TfrmOrderDetails.FormClose(Sender: TObject);
begin
  // back to enabled state
  EnableWindow(TForm(Owner).Handle, True);
end;

wbr, mo.
0
 

Author Comment

by:jose_suero
ID: 8233431
Thanks, I did almost the same with different code.  But your code it's more interesting.

Thanks again.
0
 
LVL 9

Expert Comment

by:mocarts
ID: 8233433
you are welcome :)
mo.
0
 

Expert Comment

by:CleanupPing
ID: 9316545
jose_suero:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
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…
Suggested Courses

777 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