以有簡(jiǎn)單的 吧編譯好的 vb6或者其他的vb的文件用vb.net打開 有個(gè)升級(jí)向?qū)?一步一步很簡(jiǎn)單轉(zhuǎn)換時(shí)exe只能換成exe dll只能換成dll 以前的屬性不能修改就能升級(jí)成.net框架下的vb最新的vb.net編輯了。
創(chuàng)新互聯(lián)專業(yè)網(wǎng)站建設(shè)、做網(wǎng)站,集網(wǎng)站策劃、網(wǎng)站設(shè)計(jì)、網(wǎng)站制作于一體,網(wǎng)站seo、網(wǎng)站優(yōu)化、網(wǎng)站營(yíng)銷、軟文發(fā)稿等專業(yè)人才根據(jù)搜索規(guī)律編程設(shè)計(jì),讓網(wǎng)站在運(yùn)行后,在搜索中有好的表現(xiàn),專業(yè)設(shè)計(jì)制作為您帶來效益的網(wǎng)站!讓網(wǎng)站建設(shè)為您創(chuàng)造效益。
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
樣是不行的,要轉(zhuǎn)化成VB.net只有重新改編,因?yàn)榭蚣懿煌Z法也有太多的不同
把代碼輸入到vb.net里面,可以轉(zhuǎn)。就像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
授人以漁:
這個(gè)網(wǎng)站超牛逼