Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a way to record a value to a property at runtim
Message
From
23/12/1998 17:01:51
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00170090
Message ID:
00170106
Views:
26
>>>Hi all,
>>>
>>>I wonder if this is possible. Basically, I'd like to record in one of the form's properties a value that is selected by the user and not having to record that in a table, but in the actual form's table (this is at runtime). I know the property must be initialized, so the idea is, in the next session the user will have as default value what was selected in a previous session.
>>>
>>>Thanks,
>>>
>>Gil,
>>
>>You would have to write the value into the .EXE -- Possible using low-level file functions, but very risky. I would suggest a parameter table in .dbf format which you use to store user defaults at one record for each user.
>>
>>regards,
>
>James,
>
>Thanks for the fast response, I guess you're right it could pose some serious trouble trying to do something like that, but the one thing I'm trying to stay away is to create a table just to hold one value. Doing it the way I'm thinking the EXE would have to be recompiled and who knows what else since a path to a file could be pretty lenghty and complicated in the case of network paths <g>. In any case what other alternatives could there be for instances such as this? I've thought about appending a line to the config.fpw? writing it to an .ini? Any other ideas?
>
Gil,

Sorry I had my attention diverted before I was quite done with my last response.

In the old DOS days we used to append stuff to the .exe using low level file functions. The trick is to find the end of file marker, remove it, insert a binary value and a new end of file marker. Mostly this was used to insert user IDs on setup. It was risky in DOS if you were not very careful.

I have never tried this with a Windows .exe, so I have absolutely no idea if it would cause problems.
Jim Edgar
Jurix Data Corporation
jmedgar@yahoo.com

No trees were destroyed in sending this message. However, a large number of electrons were diverted from their ordinary activities and terribly inconvenienced.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform