realbasic-nug
[Top] [All Lists]

Re: Multiple Document Interface

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Multiple Document Interface
From: Yves Vindevogel <yves dot vindevogel at implements dot be>
Date: Mon, 28 Feb 2005 12:59:06 +0100
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <07a5deb03f23e66e30060ec93eb3fdf6 at kellerfarm dot com>

On 27 Feb 2005, at 23:27, Andrew Keller wrote:

I am making an app for OSX and Windows, and it has quite a few windows. I have found that checking Multiple Document Interface in the Build Settings window makes my app look less complicated and cluttered. OSX has Exposé, and extra windows don't clutter up the dock, so the equivalent is not really needed there. I guess that's a good thing, given that there is no easy equivalent... :)

On Windows, launching the app multiple times makes multiple instances of my app. That's the way I want it. When the user calls for a new document, the new windows appear in the same app, but I would like a new instance of the app to be launched instead. Is there a proper way to do this? Do you just use a folderitem and launch the app again manually?

Launch your app again suplying a parameter. You can get the parameters of a Windows exe with API calls or with other libs (maybe MBS).

I do not need this for my app, but out of curiosity, how do you make an app that does not make new instances whenever you launch it again? In other words, how do you make it behave like it does on OSX?

You can use some Windows API calls like "FindWindow (Title)". This gives you the handle of the window with caption "Title". If it is 0, the window is not open, thus the app is not running. And, as far as I know, in VB you have the PrevInstance property.

Andrew Keller
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>