十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
以有简单的 吧编译好的 vb6或者其他的vb的文件用vb.net打开 有个升级向导 一步一步很简单转换时exe只能换成exe dll只能换成dll 以前的属性不能修改就能升级成.net框架下的vb最新的vb.net编辑了。
创新互联专业网站建设、做网站,集网站策划、网站设计、网站制作于一体,网站seo、网站优化、网站营销、软文发稿等专业人才根据搜索规律编程设计,让网站在运行后,在搜索中有好的表现,专业设计制作为您带来效益的网站!让网站建设为您创造效益。
Dim i As Integer,wd As Integer,hd As Integer
Dim Obj As HtmlDocument=WebBrowser1.Document.GetElementsByTagName("iframe")(2).Document
For i=0 To Obj.Images.Count-1
wd=Obj.Images(i).OffsetRectangle.Width
hd=Obj.Images(i).OffsetRectangle.Height
If wd=800 Or wd=790 Then
Call tupxiazai(Obj.Images(i).GetAttribute("SRC"),Application.StartupPath "\image\" i "pic.jpg")
End If
Next
样是不行的,要转化成VB.net只有重新改编,因为框架不同语法也有太多的不同
把代码输入到vb.net里面,可以转。就像word2003文档用word2007文挡打开,再保存为2007格式一样。
Private Sub SaveContents(html As String, url As String)
If String.IsNullOrEmpty(html) Then
Return
End If
Dim path As String = ""
SyncLock _locker
path = String.Format("{0}\{1}.txt", _path, System.Math.Max(System.Threading.Interlocked.Increment(_index),_index - 1))
End SyncLock
Try
Using fs As New StreamWriter(path)
fs.Write(html)
End Using
Catch ioe As IOException
MessageBox.Show("SaveContents IO" + ioe.Message " path=" path)
End Try
RaiseEvent ContentsSaved(path, url)
End Sub
System.Runtime.InteropServices.DllImport("user32.dll") _
Public Shared Function SetWindowLong(hWnd As IntPtr, nIndex As Integer, wndproc As Integer) As Integer
End Function
System.Runtime.InteropServices.DllImport("user32.dll") _
Public Shared Function GetWindowLong(hWnd As IntPtr, nIndex As Integer) As Integer
End Function
Public Const GWL_STYLE As Integer = -16
Public Const WS_DISABLED As Integer = H8000000
Public Shared Sub SetControlEnabled(c As Control, enabled As Boolean)
If enabled Then
SetWindowLong(c.Handle, GWL_STYLE, (Not WS_DISABLED) And GetWindowLong(c.Handle, GWL_STYLE))
Else
SetWindowLong(c.Handle, GWL_STYLE, WS_DISABLED + GetWindowLong(c.Handle, GWL_STYLE))
End If
End Sub
授人以渔:
这个网站超牛逼