我似乎无法执行在 FoxPro 中创建的 exe,除非我从主窗口调用它,我做错了什么?
我有一个简单的 vfp 项目,其中包含一个程序 (ppp) 和一种表单 (ppp)。该表单是一个空表单,并且 progran 包含以下内容:
SET DELETED ON
SET DATE TO DMY
SET SAFETY OFF
_screen.visible=.F.
DO FORM ppp
READ events
RETURN
我使用项目管理器将项目构建为 .exe,并且没有出现错误,并且我可以从 FoxPro 主窗口执行 .exe,没有任何问题。
但是,当我在 Windows 中双击该 exe 时,没有任何反应。我做错了什么?
I have a simple vfp project with one program (ppp), and one form (ppp). The form is an empty form, and the progran contains this:
SET DELETED ON
SET DATE TO DMY
SET SAFETY OFF
_screen.visible=.F.
DO FORM ppp
READ events
RETURN
I build the project to an .exe using the project manager and no errors appear, and I can execute the .exe from the main FoxPro window without any problem.
However, when I double-click the exe from Windows nothing happens. What am I doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
默认情况下,表单的 ShowWindow 属性设置为 0 - 在屏幕中。这意味着该表单显示在 VFP 主屏幕中。然而,_screen.visible=.F。隐藏屏幕,这样您就看不到 VFP 屏幕或您的表单。
您可以设置 _screen.visible=.T.,但您将看到 VFP 主屏幕,其中包含您的表单,这可能是您不想要的。
您还可以将表单的ShowWindow属性设置为2 - 作为顶级表单,这意味着它将显示在VFP屏幕之外和Windows任务栏上。在这种情况下,即使您使用 _screen.visible=.f 隐藏 VFP 屏幕,您仍然会看到表单。
ShowWindow 属性
By default the ShowWindow property of a form is set to 0 - In Screen. This means that the form is shown in the main VFP screen. However, _screen.visible=.F. hides the screen so you can't see the VFP screen, or your form.
You can set _screen.visible=.T., but you'll see the main VFP screen, with your form in it, which you may not want.
You can also set the ShowWindow property of your form to 2 - As Top-Level Form, which means it will display outside the VFP screen and on the windows taskbar. In that case, you'll still see your form even if you hide the VFP screen with _screen.visible=.f.
ShowWindow property
除非您安装了 vfp,否则您需要在 exe 路径中包含 vfp9r.dll 和 vfp9renu.dll。
You need vfp9r.dll and vfp9renu.dll in the exe path unless you have vfp installation.
我必须学习VFP,因为我想转到公司的开发部门,他们有一些用VFP编写的产品,最终我也陷入了这个问题。
但我找到了正确的方法。
您需要像这样初始化事件处理循环。
来源:http://msdn.microsoft.com /en-us/library/aa975719(v=vs.71).aspx
[注意] 抱歉我的英语不好,我是巴西人。
I have to learn VFP because I want to move to my company's development sector and they have some products written in VFP, eventually I got stuck into this problem too.
But I found the way to do it properly.
You need to initialize the event processing loop like this.
Source: http://msdn.microsoft.com/en-us/library/aa975719(v=vs.71).aspx
[Note] Sorry about my bad english, I am Brazilian.