vb6-migration

How to rewrite “LSet” from VB6 in VB.net (with structure types)?

此生再无相见时 提交于 2019-12-22 11:06:31
问题 I have an VB6 application which uses LSet() with two user defined data types (Type), to assign data from one type to another, e.g.: Lset type1 = Type2 Now I have to apply equivalent logic in VB.net. However, in VB.net, LSet cannot be used against different types (Types in VB6). How can I implement the VB6 LSet logic in VB.net? Sample / typical code: Public MQ_Policy As typPolicyDataRetrieval Public typPolicyDataBlock As gtypPolicyDataBlock With MQ_Policy.Input .PcPolicyIDNum = Mid(InputString

Convert VB6 app to WPF?

左心房为你撑大大i 提交于 2019-12-21 20:43:29
问题 Is it possible to convert a VB6 app to WPF using automated tools? I'm aware of tools to convert to Winforms, but what about WPF? Is there a pathway from Winforms to WPF that could be utilised? 回答1: I have never tried it but I googled it for you. Try this tool by Davide Senatore. The link is his page in babel fish because the original is in Italian. If you try it post some feedback for others. 回答2: Even if you probably find tool to convert the plain form layout, you have to rewrite the logic

VB6 migrating to .Net with Visual Studio 2010

▼魔方 西西 提交于 2019-12-21 07:05:07
问题 Has anyone migrated a VB6 project to .Net with Visual Studio 2010? I have tested the migration in VS2005, but the resulting .Net code was so messed up, that we decided not to migrate to .Net. So has the VS2010 migration wizard been improved over the wizard in VS2005 or VS2008? 回答1: It certainly hasn't in 2008 and I'd be very surprised if it's any different in 2010. VB6 and VB.net are totally different languages, and MS has never officially endorsed an automatic migration route for anything

Drop Down in VB.NET

北战南征 提交于 2019-12-20 07:24:19
问题 I have a small requirement and that is: There are two combo boxes on a form and for populating the employee names and roles. I am populating the combo boxes as follows: I have created a class called "DbConnect" and in that there are 02 functions as: Public Function getEmployees() As DataTable Dim employeeDS As New DataSet Dim employeeDA As New SqlDataAdapter("prc_emp_list", conn) employeeDA.Fill(employeeDS, "employees") Return employeeDS.Tables("employees") End Function Public Function

Name 'VarPtr' is not declared.In old vb code

二次信任 提交于 2019-12-20 03:23:39
问题 I have a old code in VB.Now I convert it into vb.net.There is a line in a code Dim pCParameters As Integer pCParameters = VarPtr(Parameters) When I execute code the error occure that Name 'VarPtr' is not declared. VarPtr not supported in vb.net.So how I replace it. 回答1: This is not as straight forward because your variables in .NET are managed. To do exactly what you are asking you need to look at GCHandle.Alloc and pin the variable so it cannot be moved. Then you can get its memory address.

Upgrading a large VB6 app to .NET. Opinions on VB Migration Partner

旧城冷巷雨未停 提交于 2019-12-20 01:13:41
问题 I have a really large VB6 code base with a ton of 3rd party controls. Want to move it to .NET. Rewriting it is out of question - the client sees no value in spending money to get the same thing. Moving to .NET with the built-in upgrade wizard is basically a non-starter. Has anyone tried the VB Migration Partner from http://www.vbmigration.com/ If so, what have been the experiences like? 回答1: I am the lead author of the VB Migration Partner tool (featured at www.vbmigration.com). In general we

VB6 Format function: analog in .NET

て烟熏妆下的殇ゞ 提交于 2019-12-19 21:54:31
问题 There is String.Format function that is referred to in the documentation as the analog for Format function from VB6. There's also Format function from VisualBasic namespace that is provided for compatibility and basically has same powers as String.Format . Indeed, those two format dates and numbers. But VB6's function was also able to format strings: ? format$("hi there", ">") HI THERE ? format$("hI tHeRe", "<") hi there ? format$("hi there", ">!@@@... not @@@@@") HI ... not THERE String

VB6 Format function: analog in .NET

安稳与你 提交于 2019-12-19 21:54:04
问题 There is String.Format function that is referred to in the documentation as the analog for Format function from VB6. There's also Format function from VisualBasic namespace that is provided for compatibility and basically has same powers as String.Format . Indeed, those two format dates and numbers. But VB6's function was also able to format strings: ? format$("hi there", ">") HI THERE ? format$("hI tHeRe", "<") hi there ? format$("hi there", ">!@@@... not @@@@@") HI ... not THERE String

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

我是研究僧i 提交于 2019-12-18 13:30:00
问题 I am currently exploring the option of porting some older VB6 application to WPF with C#. The plan, in phase one, is to port several key forms and not all the application. The theoretical goal is to open the VB6 form in a container of some sort within WPF via an ActiveX dll. Is this even possible? I've tried looking at the Interop and can't seem to find a solid example of how get it to work with anything but Win32 controls, not a full form. I have full access to the old VB6 code and can

Using a VB6 Class in C#

血红的双手。 提交于 2019-12-18 05:41:35
问题 Is it possible to use a VB6 class in C#? 回答1: I think you should just be able to add the library that contains your VB6 type as a reference in your C# project. Visual Studio will create an Interop Assembly on the fly, and you'll get access to all of the types in the VB6 library via Runtime Callable Wrappers. The tool that creates the Interop Assembly is TLBIMP.EXE, and you can run this yourself if you want more control over the process, eg. if you want to create a Primary Interop Assembly