
正文
关于vb转net的信息
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
请问以下VB项目有办法转换成VB.net项目吗?
样是不行的,要转化成VB.net只有重新改编,因为框架不同语法也有太多的不同
相关问答
Q1: 下面的VB6.0编写的代码怎么转为VB.net
Dim file1 As FileStream
filename = "c:\temp\MyTest.txt"
Dim GetData(4) As Byte, s(4) As Char
file1 = System.IO.File.OpenRead(filename)
Dim CMGs As Long
Dim DPBo As Long
Dim i As Integer = 0, j As Integer
While file1.Read(GetData, 0, 5) 0
i = i + 1
For j = 0 To 4
s(j) = ChrW(GetData(j))
Next
If s = "CMG=""" Then CMGs = i
If s = "[Host" Then DPBo = i - 2 : Exit While
End While
主要是vb.net取消了定长字符串, 所以用字节数组读入, 还得转成字符数组来比较.
Q2: 如何vb转换到vb.net
你可以直接打开 VB6 的程序,VB.net 会自动启动升级向导将你的 VB6 代码升级为 VB.net。
Q3: 从VB转到VB.net的问题
那个号回答的问题怎么总是显示不出来?
换朋友的号给你回答。
Dim FileName As String = InputBox("输入文件位置")
Dim yw As String = Nothing
yw = My.Computer.FileSystem.ReadAllText(FileName)
Dim n As Long = Len(yw)
Dim yz As String = Nothing
Dim xz As String = Nothing
Dim xw As String = Nothing
For i = 1 To n
yz = Mid(yw, i, 1)
xz = Chr(Asc(yz) + 10)
xw = xz
Next
My.Computer.FileSystem.WriteAllText(FileName, xw, True)
MsgBox("OK")
代码倒数第二行的最后一个Boolean变量是设置文件输出是否为追加模式的,根据你自己的需要做修改吧。因为我已经不记得VB里的默认输出是追加还是覆盖了。
希望能够满意~
vb转net的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于、vb转net的信息别忘了在本站进行查找喔。







