十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
'api.OnFrontConnected += new FrontConnected(OnFrontConnected);
成都创新互联自2013年创立以来,是专业互联网技术服务公司,拥有项目成都网站设计、网站制作网站策划,项目实施与项目整合能力。我们以让每一个梦想脱颖而出为使命,1280元泾源做网站,已为上家服务,为泾源各地企业和个人服务,联系电话:18980820575
AddHandler api.OnFrontConnected, AddressOf OnFrontConnected
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取消了定长字符串, 所以用字节数组读入, 还得转成字符数组来比较.
Protected Overrides Sub WndProc(ByRef m As Message)
Select Case m.Msg
Case 0x46
Dim rect As Rectangle = Screen.GetWorkingArea(Me)
Dim winPos As WINDOWPOS = CType(m.GetLParam(Type.GetType(WINDOWPOS)), WINDOWPOS)
If winPos.x + winPos.cx rect.Right Then
winPos.x = rect.Right - winPos.cx
End If
If winPos.y + winPos.cy rect.Bottom Then
winPos.y = rect.Bottom - winPos.cy
End If
If winPos.x rect.Top Then
winPos.x = rect.Top
End If
If winPos.y rect.Left Then
winPos.y = rect.Left
End If
Marshal.StructureToPtr(winPos, m.LParam, False)
MyBase.WndProc( m)
Exit Sub
Case Else
MyBase.WndProc( m)
Exit Sub
End Select
End Sub
StructLayout(LayoutKind.Sequential) _
Friend Structure WINDOWPOS
Friend hWnd As IntPtr
Friend hWndInsertAfter As IntPtr
Friend x As Integer
Friend y As Integer
Friend cx As Integer
Friend cy As Integer
Friend flags As Integer
End Structure
能不能转换 主要取决于vb6的源程序是不是使用了第三方控件 如果用了 那这些全部都不能转!~
如果vb6里面有控件数组vb.net会自动生成出一套东西(vb.net里面已经没有控件数组)模拟控件数组
如果vb6的程序很简单的话,转成.net之后应该改的地方不大!~
绝对你应该先弄清楚以前vb6的程序具体用了什么 然后去微软查一下vb6升级到vb.net最大的区别!~
我们做过好几个升级的程序 有的不用改 有的简单修改 有的基本重写!~