Lots of beginner questions

Barney barney at custombased.com
Tue Oct 21 04:47:13 CDT 2003


> where filepathname is the path and name of the file that I double-clicked
> on. Is that right? (BTW, can someone please share the command that will
> return the name of the file that was opened -- not the name of the
> application running?)

Create an application class in your project.

One of the events available to you is the 'Open Document ' event.
Available here is the 'Item' parameter as a FolderItem.

Have a read of the Language reference under application class.

Dim S as string
Dim Err as Boolean

S = item.Name

Err = DB.Open(item)

 if Err = true then
    msgBox "dbbase Open"
  else
    msgBox "Sorry couldn't open"
    return
  end if



This presumes you have initialized the V kernal already elsewhere, also
you have defined App.DB as a VDatabase.  ( ie App.DB = New Vdatabase )
All of this probably best in the open event of the Application class ?

Barney







More information about the Valentina mailing list