Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Opening Files
Message
From
12/06/2003 07:03:07
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00799257
Message ID:
00799270
Views:
22
>Can somebody help me please and excuse me for being thick!
>
>I have a command button and when clicked I have a file that I would like to open on my U: Drive.
>
>I have the syntax:
>
>FOPEN("U:\Help.Txt", 10)
>
>Nothing happens though! Can anybody help me please?

Neil,
Is that the all syntax you tried ? If so probably the file is still open.
close all && Thinking it's still open at the moment
lnHandle = fopen('u:\help.txt')
*Whatever you'd do. ie: Read first line
? fgets(lnHandle)
fclose(lnHandle)
Another way (if you don't need lowlevel and VFP version 6 and up:
lcFile = FileToStr('u:\Temp\help.txt') && Got content to a str
*thisform.edtMyEditBox.Value = lcFile

Or :
modi comm 'u:\Temp\help.txt'

etc.etc
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform