将Vb应用程序从XP迁移到Win 7 [英] Migration of vb application from xp to win 7

查看:55
本文介绍了将Vb应用程序从XP迁移到Win 7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个vb 6.0应用程序,该应用程序通过传递一些参数的ASP页面进行调用.该应用程序在Windows XP上运行良好,但是在迁移到Windows 7时,该应用程序挂起.请提出建议.

以下是调用VB应用程序Visual_Unit.exe的ASP代码.

i have an vb 6.0 application which is called from ASP pages passing some parameter. The application is running fine on windows XP but on migration to Windows 7 the application hangs. Please suggest.

Following is the ASP code which calls the VB application Visual_Unit.exe

Application("visual_exe") = Request.ServerVariables("APPL_PHYSICAL_PATH") & "Visual_Unit.exe"
Set Executor = Server.CreateObject("ASPExec.Execute")
Executor.Application = Application("visual_exe")
Executor.Parameters = "1, " & t_Exp_path & ", " & t_filename & ", " & t_user_id & "
Executor.ShowWindow = True
StrResult = Executor.ExecuteWinApp 


以下是要使用上述代码提供的参数执行的VB代码


Following is the VB code to be executed with the parameters provided by above code

Dim Pass_Value as object
 
Pass_Value = Command() 
aArr = Split(Pass_Value, ",")
Menu_Opt = aArr(0)


我的机器是Windows 7 32位.
上面的代码在WinXp


My machine is windows 7 32bit.
Above code working fine in WinXp

推荐答案

将该应用程序的兼容模式设置为Windows XP SP3的应用程序属性"对话框中可以正常工作.

之后,它可以在Windows 7中正常运行.

如果您的应用程序使用文件DSN进行数据库连接,则可能需要执行一些其他的数据访问设置.
Set Compatibility Mode for That Application to Windows XP SP3, in Application Properties Dialog.

After that It works well in Windows 7.

If Your Application Uses File DSN for Database Connection You may need to Perform Some Additional Setup for Data Access.


Executor.ShowWindow = True对于在后台运行的应用程序(由服务调用)来说看起来很奇怪. (Web服务器作为服务运行,而不是在交互式会话中运行).在Windows XP上,服务可以与用户桌面交互,而在Windows 7上则不能!
Executor.ShowWindow = True looks very odd for an application running in the background, called by a service (the web server is running as a service, not in an interactive session). While on Windows XP, a service can interact with a user desktop, on Windows 7 it cannot!


这篇关于将Vb应用程序从XP迁移到Win 7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆