[Gambas-user] how to start a file?

Jussi Lahtinen jussi.lahtinen at ...626...
Mon Sep 14 16:42:33 CEST 2009


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
>




More information about the User mailing list