Board index » cppbuilder » Non-interactive MDI

Non-interactive MDI

Hi

This is the closest group I could find to ask this question -- so
apologies if it is inappropriate.

I have a MDI database application which I occasionally need to run non
interactively.  This is to avoid having to write a console version as
well.  The program processes a command line which tells it what to do
eg:

{Logon,edUser=Text(sysdba),edPassword=Text(masterkey),edRole=Text(input),bbConnect,bbLogon}

So far, so good. The "{" is an instruction to create (but not show) a
form. The "}" closes it if it does not close by itself. Text without an
"=" (eg Logon) is treated as a menu or button click.  Text with an "="
tells the form what property to set, eg (edUser=Text(sysdba) sets the
"Text" property of the TEdit control called "edUser" to "sysdba").
Since the logon form is not an MDI, the above line is processed
perfectly, and the application establishes a database connection. Then:

{Extract,edSource=Text(oa4csa),cbAgeEnforce=Checked(true),cbAgeDump=Checked(true),bbExecute}

gives the message "No active MDI form to create child" (or something
similar) after the "Extract" menu item click has been simulated. I have
fiddled around with ActiveMDI and SetFocus, but without success.

Can one manipulate a MDI form programmatically (as one can do to a
non-MDI)?

Any help would be appreciated.

Thanks
Andrew Morgan

 

Re:Non-interactive MDI


Hi Again

Are there no takers for this challenging question?
Do I need to go through the VCL source to solve this?

Andrew Morgan

Re:Non-interactive MDI


Quote
> gives the message "No active MDI form to create child" (or something
> similar) after the "Extract" menu item click has been simulated. I have
> fiddled around with ActiveMDI and SetFocus, but without success.

One guess is from something that's been happening to me a lot lately, as
I've been trying to use some Delphi code. Do you have any code in FormCreate?
BCB apps get really hinky if you do.

But other than that, it means just what it says. Whatever the order of stuff
you are doing, something takes the away an MDI window just before you do
anything.

+=====================================================+
| Jonathan Arnold (mailto:jdarn...@buddydog.org)      |
|         Comprehensive C++Builder link site:         |
| http://www.buddydog.org/C++Builder/c++builder.html  |
+=====================================================+

Other Threads