如何在 MS Access VBA 窗体中托管 WPF 控件?
我们有一个大型 MS Access 项目,需要 GUI 功能,而这在 VBA/访问表单环境中很难/不可能实现。
随着时间的推移,我们希望重新编写/迁移到以 WPF 作为表示层的托管 C# 环境。
我们实现这一目标的唯一实用方法是在较长的时间内 - 首先转换一些 VBA 表单(这将带来最佳的生产力优势),然后在 12-24 个月的时间内转换整个系统。
您认为最好的方法是什么。 当我们转换 WPF 表单时,MS Access 可以托管它们吗?
We have a large MS Access project that requires GUI functionality that is difficult / impossible to do in the VBA / access forms environment.
Over time, we wish to re-write / migrate to a managed C# environment with WPF as the presentation layer.
The only practical way for us to do this is over a longer period of time - converting some of the VBA forms first (that would give the best productivity benefit), and then over the course of 12-24 months convert the entire system.
What do you believe is the best approach. Can MS Access host the WPF forms as we convert them?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您研究 Visual Studio Tools for Office (VSTO) 会怎么样?
您可以使用 C# 为 Office 编写托管 .NET 插件,它将作为功能区与 Office 集成。
现在的问题是 VSTO AFAIK 不支持 Access 加载项。
但是,请查看此处,看来也不是那么不可能。
因此,如果您幸运的话,您可以
如果您决定尝试一下,请告诉我结果如何:)
无论如何,祝你好运。
PS 还有其他可能有帮助的东西吗?
访问 2007 开发人员扩展 (ADE)
What if you look into Visual Studio Tools for Office (VSTO) ?
You can write managed .NET addins for Office in C#, that will integrate as ribbons with office.
Now, the problem is that Access add-ins are not supported in VSTO AFAIK.
But, take a look here, it seems to be not that impossible.
So, if you happen to be lucky, you could
If you decide to try it out, let me know how it turned out :)
Good luck anyway.
PS something else which maybe is helpful?
Access 2007 Developer Extensions (ADE)
谢谢 badbadboy - 我一定会尝试这个(使用 VSTO)。
解决方案您建议允许 VSTO 与 ms access 一起使用,这似乎有点黑客行为 - 我并不介意这一点,但我对在生产中使用此解决方法感到紧张,如果它不可靠,即不会得到 MS 的支持。
从我可以看到这个将允许我托管一个 winforms 控件,该控件又托管一个 WPF 控件。
有人使用生产系统走这条路吗?有什么注意事项吗?
请注意,codeplex 上有一个 VSTO 访问项目模板,它使该过程变得更容易一些。
Thank you badbadboy - I will certainly experiment with this (using VSTO).
The solution you suggested to allow VSTO to work with ms access, does seem slight hackery - not that I mind this, but I am nervous about using this work-around in production if it isn't solid i.e there would be no support from MS.
From what I can see this will allow me to host a winforms control, that in-turn hosts a WPF control.
Anybody gone down this path with a production system - any caveats?
Note there is a VSTO access project template on codeplex that makes the process a little easier.