VBÓëFTP±à³Ì
Option Explicit
Private Const INTERNET_OPEN_TYPE_DIRECT = 1
Private Const scuseragent = "vb wininet"
Private Const INTERNET_FLAG_PASSIVE = &H8000000
'µ÷ÓÃÉèÖû·¾³
Private Declare Function InternetOpen Lib "wininet.dll" Alias "InternetOpenA" (ByVal sAgent As String, ByVal lAccessType As Long, ByVal sProxyName As String, ByVal sProxyBypass As String, ByVal lFlags As Long) As Long
'Á¬½Ó·þÎñÆ÷
Private Declare Function InternetConnect Lib "wininet.dll" Alias "InternetConnectA" (ByVal hInternetSession As Long, ByVal sServerName As String, ByVal nServerPort As Integer, ByVal sUsername As String, ByVal sPassword As String, ByVal lService As Long, ByVal lFlags As Long, ByVal lContext As Long) As Long
'ÉÏ´«ºÊý
Private Declare Function FtpPutFile Lib "wininet.dll" Alias "FtpPutFileA" (ByVal hFtpSession As Long, ByVal lpszLocalFile As String, ByVal lpszRemoteFile As String, ByVal dwFlags As Long, ByVal dwContext As Long) As Boolean
Private Declare Function FtpGetFile Lib "wininet.dll" Alias "FtpGetFileA" (ByVal hFtpSession As Long, ByVal lpszRemoteFile As String, ByVal lpszNewFile As String, ByVal fFailIfExists As Boolean, ByVal dwFlagsAndAttributes As Long, ByVal dwFlags As Long, ByVal dwContext As Long) As Boolean
Private Declare Function InternetCloseHandle Lib "wininet.dll" (ByVal hInet As Long) As Integer
Dim hOpen As Long
Dim hConnection As Long
'ÉÏ´«ÎļþÄ£¿é
Public Function UpLoadFile(IP As String, FileName As String, UserName As String, PassWord As String) As Boolean
Dim ShortName As String
Dim ret As Boolean
ShortName = GetShortName(FileName)
hOpen = TestServer
If hOpen <> 0 Then
hConnection = InterConnection(IP, UserName, PassWord)
If hConnection <> 0 Then
ret = FtpPutFile(hConnection, FileName, ShortName, 2, 0)
UpLoadFile = ret
Else
UpLoadFile = False
End If
Else
UpLoadFile = False
End If
InternetCloseHandle hConn
Ïà¹ØÎĵµ£º
ÌâÄ¿:
ÈçºÎ»ñÈ¡ÍøÒ³ÏÂÎÄ×ÖµÄÁ´½ÓµØÖ·
´°¿ÚÓÐWebBrowser1£¬ºÍÒ»¸öText1
ÏÖÔÚ
Private Sub Form_Load()
WebBrowser1.Navigate "http://www.baidu.com"
End Sub
´ò¿ª´°ÌåÏÔʾ°Ù¶ÈµÄÊ×Ò³£¬ÒªÇ󻬶¯Êó±êµ½“ÐÂÎŔʱ
Text1ÀïÏÔʾhttp://news.baidu.com/
»¬¶¯µ½“Ìû°É”ʱ
Text1ÀïÏÔʾÇå¿ ......
Option Explicit
Private Declare Function ReleaseCapture Lib "user32" () As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Long) As Long
Const HTCAPTION = 2
Const WM_NCLBUTTONDOWN = &HA1
Pri ......
http://tieba.baidu.com/f?kz=580219489
http://www.anqn.com/vb/154/8974.shtml
http://www.codefans.net/soft/5089.shtml
http://www.mndsoft.com/blog/article.asp?id=1121
http://topic.csdn.net/t/20020113/14/474848.html
Ö±½ÓÔËÐÐÍøÒ³ÖеÄJavaScript£º
function alllefttab()
WebBrowser1.Document.par ......
¼üÅÌÊÇÎÒÃÇʹÓüÆËã»úµÄÒ»¸öºÜÖØÒªµÄÊäÈëÉ豸ÁË£¬¼´Ê¹ÔÚÊó±ê´óÐÐÆäµÀµÄ½ñÌ죬ºÜ¶à³ÌÐòÒÀÈ»Àë²»¿ª¼üÅÌÀ´²Ù×÷¡£µ«ÊÇÓÐʱºò£¬Ò»Ð©Öظ´ÐԵģ¬ºÜ·±ËöµÄ¼üÅ̲Ù×÷ ×Ü»áÈÃÈËÆ£±¹£¬ÓÚÊǾÍÓÐÁËÓóÌÐòÀ´´úÌæÈËÃÇ°´¼üµÄ·½·¨£¬ÕâÑù¿ÉÒ԰ѺܶàÖظ´ÐԵļüÅ̲Ù×÷½»¸ø³ÌÐòÀ´Ä£Ä⣬ʡÁ˺ܶྫÁ¦£¬°´¼ü¾«Áé¾ÍÊÇÕâÑùµÄÒ»¸öÈí¼þ¡£ÄÇô ÎÒÃÇÔõÑù²Å ......