开发者

Using VB 6.0 Forms in VB.NET

Any ideas on how to Use F开发者_如何学JAVAorms created in VB 6.0 in VB.NET ?


  1. Put your VB 6 in a DLL. Create a public method that invokes a modal dialog from VB 6.
  2. From your .NET program, reference the DLL built in VB 6 (COM tab)
  3. Invoke the method. Your VB6 modal form will appear.

If you want to show a modeless form, you may be out of luck because VB 6 requires that the caller of the dialog do special processing in the message pump. However, you may be able to trick the system by trying this: From the VB 6 code, rather than calling the Show method of the VB 6 form, set the .Visible property of the VB 6 modeless form to True. It will probably work. Some things may not work such as button shortcuts, and some ActiveX controls embedded in the VB 6 code might have problems.


Try this post:

Can/how do you host a full VB6 Form in a C# WPF app?

Having done this myself several times in the past, let me just say this is not fun stuff.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜