Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP500.DLL do not use as in VFP.exe, Cry for VFP500.DLL!
Message
From
10/05/1998 22:05:48
 
 
To
09/05/1998 18:20:22
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00098264
Message ID:
00098413
Views:
27
>>In VFP.exe:
>>
>>SET FIELD TO
>>messagebox(Set([Field],1)) && will list all the fields with alias name
>>
>>But in Execute File run in VFP500.DLL:
>>
>>SET FIELD TO
>>messagebox(Set([Field],1)) && will return a word [All]
>
>I never saw this before - because I don't do it that way!!
>
>I use the AFIELDS() function to create an array of fields, and ALIAS() to get the alias of the current workarea.


Thanks, Paul.
Since hiding more than one columns by setting column width to zero make the grid poor in show(Thick black lines) and useless on keyboard {Tab}, I try another method to do.

Set Field to Field1, Field2, Field3...
Where this field list is set by user favour!

Once I set the field list, AFields() will NOT return the original list.
So, the user cannot ReChoose the fields list as the list is shorten as previous selection. Thus, I use SET([Fields],1) to carry the Current Fields Selection and ReSet the list to all(i.e. Set Field to)
But the selection listbox need to fill in the value.

Finally, I trace it inside VFP and setting StrTran() to remove the return value:
CurrentFieldlist = StrTran(Set([Fields],1), [MyAlias] + [.])
Set Field to
THisform.totalfieldlist.rowsourcetype = 0
THisform.totalfieldlist.rowsourcetype = 8
THisform.totalfieldlist.rowsource = [MyAlias]
...
but in executable file: the list become a value [all]!!
I want to know why VFP500.DLL do not work as inside VFP.
This is NOT What you see, what you get!!

Okey, In your advice, I can use Afields() to carry all field information and
use following code to fill in the listbox.
CurrentFieldlist = StrTran(Set([Fields],1), [MyAlias] + [.])
Set Field to
Afields(ArrayFields)
THisform.totalfieldlist.rowsourcetype = 0
THisform.totalfieldlist.rowsource = []
For iX = 1 to Alen(ArrayFields)/ 16   && Array Structure: [num_fields, 16]
  Thisform.totalfieldlist.additem(ArrayFields[iX, 1])
Endfor
Anyway, this would be the fault of VFP, not me Unless there is NO Set Field function at all.
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Previous
Reply
Map
View

Click here to load this message in the networking platform