gettingstarted
[Top] [All Lists]

Re: Little Help - Double-clicking to open file - small problem

To: Getting Started <gettingstarted at lists dot realsoftware dot com>
Subject: Re: Little Help - Double-clicking to open file - small problem
From: Harrie Westphal <harriew at frontiernet dot net>
Date: Sun, 25 Dec 2005 10:06:58 -0600
Delivered-to: gettingstarted at lists dot realsoftware dot com
References: <20051225133856 dot 90677 dot qmail at web60414 dot mail dot yahoo dot com>

On Dec 25, 2005, at 7:38 AM, Lennox Jacob wrote:


     f=GetOpenFolderItem("text")
displays open file-dialog and all goes well, but I don't want the open-file dialog to be displayed, I want the file be opened directly.

Lennox,

To handle the case where the user double clicks a file owned by the application or drags one of those files onto the application icon you need to put your code in the "OpenDocument" event handler of the application class. If you look at that event you will see that it starts with:

Sub OpenDocument(Item As FolderItem)

A folderitem is already created for the file that you double clicked on. At this point you place the code to open the file or call a method that has the code to open the file. Typically it would open the file, instantiate the proper startup window etc. Note that if you select more than one file and then double click this OpenDocument event handler will be invoked multiple times, once for each selected file.


=== A Mac addict in Tennessee ===

_______________________________________________
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>