[Gambas-user] how to start a file?

Robert JUHASZ robert1juhasz at ...626...
Tue Sep 15 01:21:47 CEST 2009


Hi,

I mean to let the user to attach a file in run time (I save the link) and
let him run the file. Just I don't know how open that file using the
link (not for my gambas application but just for the user with the default
program of the "attached" file).

In VBA I used "ShellExecute" for running programs, files or following links.
I just would need the same.

Thanks,
Robi

2009/9/14 Jussi Lahtinen <jussi.lahtinen at ...626...>

> I'm not sure what you mean, but this code creates file.
>
> Dim hFile as File
> Dim sString as String = "Something to write."
>
> hFile = Open "testfile.txt" For Create
> Write #hFile, sString
> Close #hFile
>
> More from here:
> http://gambasdoc.org/help/lang/open
> http://gambasdoc.org/help/cat/stream
>
>
> Or if you mean how to attach files to your project.
> For example; right mouse click on Data folder --> New --> Other...
> then just choose
> what ever you need.
>
>
> Jussi
>
>
>
> On Mon, Sep 14, 2009 at 02:18, Dimitris Anogiatis <dosida at ...626...>
> wrote:
> > Hey Robi,
> >
> > one of the options is to use the gb.settings library.
> >
> > while you're on the IDE press CTRL and P then click on the Componets tab,
> > find gb.settings and click on the box on the left side of the selection
> then
> > press Ok
> >
> > now in your code you need to use this on top of your code (ie put this on
> > the first line of your form or module)
> >
> > Public pathSettings AS NEW Settings(User.Home &/ Application.Name &/
> > Application.Name & ".conf")
> >
> > this means that if your user account name is robi and your application's
> > name is myApp then the settings
> > file will be created in this path
> >
> > /home/robi/myApp/myapp.conf
> >
> > now to save settings you use pathSettings like this
> >
> > pathSettings["Files/LoadFrom"]="your path"
> >
> > this will create a category Files in your settings file and under that it
> > will create a LoadFrom item
> > where you can store your path's value
> >
> > to read that value all you have to do is
> >
> > myPath = pathSettings["Files/LoadFrom"]
> >
> > I hope it helps
> >
> > Regards
> > Dimitris
> >
> >
> > On Sun, Sep 13, 2009 at 4:39 PM, yuhej <robert1juhasz at ...626...> wrote:
> >
> >>
> >> Hello,
> >>
> >> I just start with Gambas (used VB before) and hopefully I found a place
> >> where I can get some answers.
> >> At this moment I wish to add an option of attaching files in my
> application
> >> (by saving the path) and to open them later.
> >> Can someone tell me how can I start a file from Gambas? For instance a
> >> spreadsheet with open office?
> >>
> >> Thanks for your help in advance.
> >>
> >> Robi
> >> --
> >> View this message in context:
> >> http://www.nabble.com/how-to-start-a-file--tp25416046p25416046.html
> >> Sent from the gambas-user mailing list archive at Nabble.com.
> >>
> >>
> >>
> >>
> ------------------------------------------------------------------------------
> >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> 30-Day
> >> trial. Simplify your report design, integration and deployment - and
> focus
> >> on
> >> what you do best, core application coding. Discover what's new with
> >> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> >> _______________________________________________
> >> Gambas-user mailing list
> >> Gambas-user at lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/gambas-user
> >>
> >
> ------------------------------------------------------------------------------
> > Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> 30-Day
> > trial. Simplify your report design, integration and deployment - and
> focus on
> > what you do best, core application coding. Discover what's new with
> > Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list