Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

ini-file

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-04-2007, 03:56 PM
sloopa's Avatar
Knows the basics
 
Join Date: Apr 2007
Location: Germany
Posts: 60
Default ini-file

i am just to lazy... so don't stress your mind!
(i will find a solution myself)

but if a solution exists:

has somebody a solution for a configuration-file like an ini-file?
__________________
sL00Pa

-1- HTC Diamond / WM6.1
-2- Asus A636 / WM5

(I'm not a native english-speaker - if I make mistakes, please correct me!)
Reply With Quote
  #2 (permalink)  
Old 05-04-2007, 04:29 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,734
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

It should be pretty easy.
Code:
<font size="2"><font color="#0000ff">Sub </font></font><font size="2">Globals</font>
 
<font size=
"2"><font color="#0000ff">End Sub</font></font>
<font size=
"2"><font color="#0000ff">Sub </font></font><font size="2">App_Start</font>
<font size=
"2">Form1.Show</font>
<font size=
"2"><font color="#0000ff">If</font></font><font size="2"><font color="#0000ff">FileExist</font></font><font size="2">("myapp.ini") = true then </font>
<font size=
"2"><font color="#0000ff"> FileOpen</font></font><font size="2">(c1,"myapp.ini",cRead)</font>
<font size=
"2"> parameter1 = </font><font size="2"><font color="#0000ff">FileRead</font></font><font size="2">(c1)</font>
<font size=
"2"> parameter2 = </font><font size="2"><font color="#0000ff">FileRead</font></font><font size="2">(c2)</font>
<font size=
"2"><font color="#008000"'...</font></font>
<font size="2"><font color="#0000ff"> FileClose</font></font><font size="2">(c1)</font>
<font size=
"2"><font color="#0000ff">End</font></font><font size="2"><font color="#0000ff">if</font></font>
<font size=
"2"><font color="#0000ff">End Sub</font></font>
 
<font size=
"2"><font color="#0000ff">Sub</font></font><font size="2"> Form1_Close</font>
<font size=
"2"><font color="#0000ff">FileOpen</font></font><font size="2">(c1,"myapp.ini",cWrite)</font>
<font size=
"2"><font color="#0000ff">FileWrite</font></font><font size="2">(c1,parameter1)</font>
<font size=
"2"><font color="#0000ff">FileWrite</font></font><font size="2">(c1,parameter2)</font>
<font size=
"2"><font color="#008000">'...</font></font>
<font size="2"><font color="#0000ff">FileClose</font></font><font size="2">(c1)</font>
<font size=
"2"><font color="#0000ff">End</font></font><font size="2"><font color="#0000ff">Sub</font></font>
Reply With Quote
  #3 (permalink)  
Old 05-04-2007, 06:04 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Hi,

I adressed a similar issue in the old forum were when my app started it searched for a language config file and load it's contents...If usefull i'll re-write my code sample and post it...
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!
Reply With Quote
  #4 (permalink)  
Old 05-04-2007, 06:10 PM
sloopa's Avatar
Knows the basics
 
Join Date: Apr 2007
Location: Germany
Posts: 60
Default

Hi CableGuy

you're welcome (to send the code )
__________________
sL00Pa

-1- HTC Diamond / WM6.1
-2- Asus A636 / WM5

(I'm not a native english-speaker - if I make mistakes, please correct me!)
Reply With Quote
  #5 (permalink)  
Old 05-04-2007, 06:49 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Here's my sample code for the above issue, hope it helps..
Attached Files
File Type: zip test.zip (1.1 KB, 79 views)
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!
Reply With Quote
  #6 (permalink)  
Old 05-04-2007, 06:50 PM
taximania's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 592
Awards Showcase
Beta Tester 
Total Awards: 1
Default

An example of file read and write is in the source code for my GpsCompass App.

See thread http://www.basic4ppc.com/forum/share-your-creations/66-gpscompas-app.html

Just change the file extension to .ini not .txt
__________________
.
.
.
Don't ask, I'm fine, honest. !!
.
.
.
Just a little crazy at times



O2 XDA, GW Evo 2.1 UC WWE Rom, WM6.1
Radio Ver 03.34.90
With Basic4ppc V6.80


http://www.taximania.co.uk
Reply With Quote
  #7 (permalink)  
Old 05-04-2007, 07:06 PM
RandomCoder's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Derbyshire, UK
Posts: 623
Awards Showcase
Beta Tester 
Total Awards: 1
Default

This advice has also helped me, I'm wanting to create a high scores table for my Splat Master game which I showed in the old Forum. With a bit of luck I'll have this done in next to no time now and then I'll post my code again for you all to enjoy. It's bigger and better now

Thanks,
RandomCoder
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
CSV file generates strange start in file sunnyboyj Questions (Windows Mobile) 9 12-21-2007 08:38 PM


All times are GMT. The time now is 11:00 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0