将VB 6升级到VB.NET [英] Upgrading VB 6 to VB.NET

查看:77
本文介绍了将VB 6升级到VB.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在代码顾问的帮助下从vb6升级到vb.net。我也是vb.net的新手。


但是,我仍然面临修改现有代码以执行转换的一些问题。以下是显示我需要修改代码的消息。


''FIXIT:''lstItem.ForeColor''不是通用''Form''对象的属性Visual Basic .NET。访问 lstItem.ForeColor声明OBJ利用其实际类型,而不是表格 FixIT90210ae-R1460-RCFE85

obj.lstItem.ForeColor =安培; HFF&安培; ''红色


这里的问题是我如何修改它?...我真的不知道如何做到这一点。


实际上我也读过msdn,但它没有做任何帮助,因为给出的例子是问题:


''价值' '不是vb.net中通用''Control''对象的属性。要访问''Value''声明''ctl''使用它的实际类型而不是''Control''.....请帮助我。


非常感谢。

解决方案

嗨。谁编写了您尝试更新到.NET的代码?

为什么要将此特定代码更新为.NET?



您好,我目前正在代码顾问的帮助下从vb6升级到vb.net。我也是vb.net的新手。


但是,我仍然面临修改现有代码以执行转换的一些问题。以下是显示我需要修改代码的消息。


''FIXIT:''lstItem.ForeColor''不是通用''Form''对象的属性Visual Basic .NET。访问 lstItem.ForeColor声明OBJ利用其实际类型,而不是表格 FixIT90210ae-R1460-RCFE85

obj.lstItem.ForeColor =安培; HFF&安培; ''红色


这里的问题是我如何修改它?...我真的不知道如何做到这一点。


实际上我也读过msdn,但它没有做任何帮助,因为给出的例子是问题:


''价值' '不是vb.net中通用''Control''对象的属性。要访问''Value''使用它的实际类型声明''ctl''而不是''Control''.....请帮助我。


非常感谢。



你在vb中使用listbox ctrl吗?然后尝试将其转换为.net?

u也可以通过从vb.net2005版本直接打开vb项目将代码从vb转换为.net


< blockquote class =post_quotes>
你在vb中使用listbox ctrl吗?然后尝试将其转换为.net?

u也可以通过从vb.net2005版本直接打开vb项目将代码从vb转换为.net



嗨。是的,vb6中的现有系统正在使用listbox ctrl,我现在正在尝试将其转换为vb.net。


我已经尝试过你的方式直接从vb.net 2005打开它我得到了这个:


''FIXIT:''lstItem.ForeColor''不是Visual Basic .NET中泛型''Form''对象的属性。为了获得'lstItem.ForeColor声明OBJ使用其实际类型,而不是'表'FixIT90210ae-R1460-RCFE85

UPGRADE_ISSUE:控制lstItem不能因为解决它位于通用命名空间Form中。
obj.lstItem .ForeColor =& HFF''red


我现在该怎么办?有些东西似乎不适合粗体代码。我如何修改它?


说真的,我之前没有vb.net的经验,事实上我只是一个新的IT实习生和我的老板要求我从vb 6转换系统到vb.net。


希望你能帮助并指导我完成这项工作。实际上,当我想将vb转换为vb.net时,第一步要做什么?我是否需要修改vb 6中的任何编码?


非常感谢。


Hi, im currently doing an upgrade from vb6 to vb.net with the help of code advisor. Im also new to vb.net.

However, im still facing some problems modifying existing codes to perform the conversion. Below is the message showing that I need to modify the codes.

''FIXIT: ''lstItem.ForeColor'' is not a property of the generic ''Form'' object in Visual Basic .NET. To access ''lstItem.ForeColor'' declare ''obj'' using its actual type instead of ''Form'' FixIT90210ae-R1460-RCFE85
obj.lstItem.ForeColor = &HFF& ''red

The problem here is how do i modify it?...I really dont have any idea on how to do that.

Actually I have also read through the msdn but it didnt do any help as the example given is the issue :

''Value'' is not a property of the generic ''Control'' object in vb.net. To access ''Value'' declare ''ctl'' using its actual type instead of ''Control''..... Please help me.

Many thanks.

解决方案

Hi. Who wrote the code that you are trying to update to .NET?
Why are you updating this particular code to .NET?


Hi, im currently doing an upgrade from vb6 to vb.net with the help of code advisor. Im also new to vb.net.

However, im still facing some problems modifying existing codes to perform the conversion. Below is the message showing that I need to modify the codes.

''FIXIT: ''lstItem.ForeColor'' is not a property of the generic ''Form'' object in Visual Basic .NET. To access ''lstItem.ForeColor'' declare ''obj'' using its actual type instead of ''Form'' FixIT90210ae-R1460-RCFE85
obj.lstItem.ForeColor = &HFF& ''red

The problem here is how do i modify it?...I really dont have any idea on how to do that.

Actually I have also read through the msdn but it didnt do any help as the example given is the issue :

''Value'' is not a property of the generic ''Control'' object in vb.net. To access ''Value'' declare ''ctl'' using its actual type instead of ''Control''..... Please help me.

Many thanks.

are u using listbox ctrl in vb? then trying to convert it into .net?
u can also convert the code from vb to .net by directly opening the vb project from vb.net2005 edition


are u using listbox ctrl in vb? then trying to convert it into .net?
u can also convert the code from vb to .net by directly opening the vb project from vb.net2005 edition

Hi. Yes, the existing system in vb6 is using listbox ctrl and im now trying to convert it to vb.net.

Ive tried your way by opening it directly from vb.net 2005 and i got this :

''FIXIT: ''lstItem.ForeColor'' is not a property of the generic ''Form'' object in Visual Basic .NET. To access ''lstItem.ForeColor'' declare ''obj'' using its actual type instead of ''Form'' FixIT90210ae-R1460-RCFE85
''UPGRADE_ISSUE: Control lstItem could not be resolved because it was within the generic namespace Form.
obj.lstItem.ForeColor = &HFF ''red

What should i do now? Something seems to be not right for the code in bold. How do i modify it?

Seriously, i have no experience in vb.net before with the fact that im only a new IT trainee and my boss asks me convert the system from vb 6 to vb.net.

Hope that u can help and guide me through this. Actually, what is the first step to do when i want to convert vb to vb.net? Do i need to modify any coding in vb 6?

Many thanks.


这篇关于将VB 6升级到VB.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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