Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
External FXP called from EXE cannot find form in EXE
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00614731
Message ID:
00614782
Views:
31
Thanks Vlad,

Well, I guess learned the hard way. Here's a workaround that seems to work. I created the following kludgy routine within a procedure file that gets included in the EXE build:

Procedure DoAnyForm
LParam cFormInfo
Do Form &cFormInfo
Return

And this seems to work since the form is now in the scope of the code. Now in the external FXP I use something like:

Private cFormResult,cTitle
cFormResult=""
cTitle="blah"
Do DoAnyForm in MyProcedureFile with "MyForm with cTitle to cFormResult"


...so I can use any form that is included in the EXE build.

>Hi!
>
>Forms are not usable from outside of the EXE. PRGs and class libraries are available, because you can download them into the memory by SET PROCEDURE and SET CLASSLIB statements. Save your form as a class, then run it as a class - this will probably solve the problem.
>
>HTH.
>
>P.S. About UT search - it is not useless. The serach criteria you wanted to use is useless, because it will return you 5,000+ messages as a result of the search, because a LOT of messages contain the word "form". Now, will you be able to find the answer in such huge list of messages? I guess no. Just think more on creating narrower search criteria.
>
>>Why is it that a form that is included in an EXE build cannot be found by an FXP that is called by the EXE? The form is explicitly included in the project and thus (I suppose) is included in the build. Any idea why this is happening. I get the message:
>>
>>File "c:\mydir\myform.scx" does not exist.
>>
>>In fact it doesn't exist as a separate file. But is in included in the EXE build.
>>
>>By the way, (a message to UT management) I tried to search for messages that had the word "form" in the TITLE (just the title), and the UT search engine would not let me, saying that "form" is a common word and has to be used with other words in an exact match. In this case, the search engine becomes both patronizing and virtually useless to me because of this restriction. PLEASE CHANGE THIS so I can search titles for any damn word I please except the reserved ones. Also please fix the search engine so it doesn't keep coming up with that "An unexpected something or other has occurred and will be logged..." message.
Previous
Reply
Map
View

Click here to load this message in the networking platform