用戶登錄  |  用戶注冊
首 頁源碼下載網絡學院最新源碼源碼排行屏蔽廣告
當前位置:新興網絡 > 網絡學院 > 標簽 > VB
  • [Visual Basic]VB WinInet Post/Get 提交模塊代碼2011-10-09 01:07:19 |
    · '調用示例Debug.Print WinInetGet("http://127.0.0.1/index.html")Debug.Print WinInetPost("http://127.0.0.1/index.php", "UserName=admin")'上面兩個函數都是返回byte數組,如果出現亂碼可以通過以下這個函數安指...
  • [Visual Basic]VB Wininet實現文件下載與網頁獲取函數2011-09-11 20:39:02 |
    · VB Wininet實現二進制文件下載以及獲取網頁源碼。...'下面是在Form窗體中的調用示例代碼。 '寫入文件Private Sub WriteFile(ByteArray() As Byte, Path As String) Open Path For Binary As #1 Put #1, , ByteArray() Close #1End Sub'網...
  • [Visual Basic]VB 使用SendMessage枚舉文件與目錄2011-07-07 09:48:32 |
    · Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As LongPrivate Const LB_DIR = &H18DPrivate C...
  • [Visual Basic]VB UTF-8 URL編碼函數2011-05-09 13:35:37 |
    · VB UTF-8 URL編碼函數: Public Function UTF8_URLEncoding(szInput) Dim wch, uch, szRet Dim x Dim nAsc, nAsc2, nAsc3 If szInput = "" Then UTF8_URLEncoding = szInput Exit Function End If For x = 1 To Len...
  • [Visual Basic]VB 窗體實現文件拖拽獲取路徑方法2011-04-25 13:18:21 |
    · VB 窗體、ListBox、TreeView、ListView中實現文件拖放獲取文件完整路徑方法。...VB 窗體實現文件拖拽,只需要將窗體的OLEDropMode 屬性設置為1即可。同樣在ListBox、TreeView、ListView……等控件都提供這個屬性設置的。然后通過OLEDragDrop事件...
  • [腳本語言]VBS/VB 二進制文件上傳類,模擬HTTP上傳文件2011-04-24 18:48:22 |
    · VBS模擬HTTP 表單Post上傳二進制文件,VBS/VB均可使用。 ''''''''''''''''''''''''''''''''Desc:VBS文件上傳類'Author:shadu@foxmail.com + http://www.motobit.com/tips/detpg_uploadvbsie/ (2001 Antonin Foller, ...
  • [Visual Basic]VB 獲取execScript返回值另類方法2011-04-24 16:12:15 |
    · VB WebBrowser1 控件執行JS函數,并獲取返回值。...方法就是先執行JS函數,然后將返回的結果存放在一個變量里面,再通過Document.Script來獲取該變量的值。 <script type="text/javascript"> var ReturnValue function test(){ Retur...
  • [Visual Basic]VB PopupMenu彈出右鍵菜單小例子2011-04-10 09:18:12 |
    · 附件下載.rar 很基礎的知識,大鳥飛過。 Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)'利用PopupMenu方法 If Button And vbRightButton Then PopupMenu wj '彈...
  • [Visual Basic]VB 使某個窗口獲取焦點的API函數2011-03-16 23:36:17 |
    · 使用 SetForegroundWindow API即可實現。聲明如下: Private Declare Function SetForegroundWindow Lib "user32" (ByVal hwnd As Long) As Long hwnd 參數是窗口的句柄。 返回值:如果窗口設入了前臺,返回值...
  • [Visual Basic]VB 通過SendMessage 發送消息獲取文本框的內容2011-03-16 20:16:04 |
    · VB 通過SendMessage 發送消息獲取文本框的數據的函數: Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As An...
  • [Visual Basic]VB 設置CapsLock、ScrollLock、NumLock鍵狀態2011-03-13 07:08:00 |
    · VB 設置CapsLock、ScrollLock、NumLock 按鍵狀態: Option ExplicitPrivate Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)P...
  • [Visual Basic]VB 文件編碼互換模塊(支持 Ansi,UTF-8,Unicode(little endian),Unicode big endian)2011-03-08 17:55:56 |
    · VB 文件編碼互換模塊,支持對Ansi,UTF-8,Unicode(little endian),Unicode big endian編碼之間進行轉換。 Option ExplicitPrivate Declare Function MultiByteToWideChar Lib "kernel32.dll" (ByVal CodePage As...
  • [Visual Basic]VB 移動Combobox某項的位置2011-03-07 23:59:59 |
    · VB 移動Combox某項的位置: 'cbojob當前選擇向下移一位Private Sub cmdPostpone_Click() Dim strItem As String Dim lngIndex As Long 'copy原來的數據,包括列數據 strItem = Me.cboJob & ";" & Me.cboJob...
  • [Visual Basic]VB Listview控件列寬度自動調整2011-03-07 23:50:22 |
    · VB 實現自動調整Listview列表控件的列寬度: Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long...
  • [Visual Basic]VB 按指定編碼格式寫入文本文件2011-02-27 17:05:29 |
    · VB 按指定編碼格式寫入文本文件,默認GB2312編碼。 Private Sub SaveFile(FilePath As String, strText As String, Optional Charset As String = "GB2312") Dim Obj As Object Set Obj = CreateObject("ADODB.Str...
  • [Visual Basic]VB 純代碼實現判斷文件目錄是否存在2011-02-26 18:13:23 |
    · VB 純代碼實現判斷文件目錄是否存在,沒有用到API 、組件等,純VB 內置函數實現判斷某個文件夾是否存在。 Public Function DirectoryExists(ByVal Directory As String) As Boolean If InStrRev(Directory, "\") <> ...
  • [Visual Basic]VB 通過文件路徑獲取該文件所在目錄的函數2011-02-26 18:11:34 |
    · VB 通過文件路徑獲取該文件所在目錄的函數: Private Function getDirectory(FilePath As String) getDirectory = Mid(FilePath, 1, InStrRev(FilePath, "\"))End Function
  • [Visual Basic]VB 通過SendMessage發送消息添加ComboBox列表項值2011-02-23 22:10:34 |
    · VB 通過SendMessage發送消息添加ComboBox列表項值,也就是實現了Combo中的AddItem方法。 Private Const CB_ADDSTRING = &H143Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByV...
  • [Visual Basic]VB 通過窗體句柄獲取標題函數2011-02-22 12:25:23 |
    · VB 通過窗體句柄獲取標題函數,通過已知的句柄獲取該句柄的標題。 Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal Hwnd As Long, ByVal lpString As String, ByVal cch As L...
  • [Visual Basic]VB 實現UTF-8 與GB2312互轉2011-02-22 05:11:21 |
    · VB 利用ADODB.Stream來實現UTF-8 與GB2312互轉。 '* ** *'* 模塊名稱:modCharset.bas'* 模塊功能:GB2312與UTF8相互轉換函數'* 作者:lyserver'* ** *Option Explicit'- --- -' 函數說明:GB2312轉換為UTF8'- ...
  • [Visual Basic]VB 判斷圖片文件的類型格式2011-02-18 14:48:11 |
    · VB 通過二進制方式來判斷圖片的格式,下面只對 JPG 、GIF、PNG、BMP、ICO 幾個常用的圖片格式做了判斷。 Public Function GetImageType(ByteArray() As Byte) As String If ByteArray(0) = &HFF And ByteArray(...
  • [Visual Basic]VB 十六進制字符串轉2進制數組2011-02-16 16:49:10 |
    · VB 16進制字符串轉二進制數組函數: Private Function HexToBytes(strHex As String) As Byte() strHex = Trim$(strHex) Dim TempData() As String Dim Data() As Byte, i As Long TempData = Split(strHex, " ") ...
  • [Visual Basic]VB 二進制數組轉換成16進制字符串函數2011-02-16 16:16:45 |
    · VB 二進制Byte()數組轉換成十六進制字符串函數: Private Function BytesToHex(bytB() As Byte) As String Dim strTmp As String, i As Long For i = 0 To UBound(bytB) strTmp = strTmp & " " & Hex(bytB...
  • [Visual Basic]VB 判斷是否文本文件2011-02-15 19:31:56 |
    · Option Explicit'*'**作 者:新興網絡'**原 文:http://www.suasdey.com/Tech/Program/VisualBasic/666.html'**如果需要轉載,請保留作者信息謝謝'*Public Function IsTextFile(Bytes() As Byte) As Boolean Dim i ...
  • [Visual Basic]VB ListBox 添加不重復的值2011-02-15 17:27:01 |
    · VB ListBox 添加不重復的值,當列表中已經存在該值即不再添加。 Private Function AddList(List As ListBox, Str As String) As Boolean Dim I As Long For I = 0 To List.ListCount-1 If List.List(I) = Str Then...
  • [Visual Basic]VB 判斷當前是否運行在VB6 IDE環境中2011-02-09 11:47:31 |
    · Private Function IsIDE() As Boolean Static bInIDE As Boolean bInIDE = Not bInIDE If bInIDE Then Debug.Assert IsIDE() Or True IsIDE = Not bInIDE End IfEnd FunctionPrivate Sub Form_Load() MsgBox IsIDEEn...
  • [Visual Basic]VB 將HTML格式文本寫入RichTextBox控件中2011-02-05 16:45:54 |
    · VB 在RichTextBox控件中使用HTML代碼來設置文字樣式,目前只支持 、
    、 標簽,可通過font標簽的Color、Size、Face屬性來設置文本的字體顏色、字體大小以及文字字體。...VB 在RichTextBox控件中使用HTML代碼來設置文字樣式,目前只支持 <font>、<br>、<b> 標簽,可通過f...
  • [Visual Basic]將網頁顏色值轉換為VB顏色值的函數2011-02-04 13:27:15 |
    · 將網頁顏色值轉換為VB顏色值的函數,同時支持顏色名稱轉換。 Public Function WebColorToVBColor(WebColor As String) As Long Dim strhex As String, R As Double, G As Double, B As Double If InStr(WebColor, ...
  • [Visual Basic]挺不錯的一個 VB數組排序模塊2011-02-04 11:09:06 |
    · VB數組排序模塊,使用的是快速排序法,支持 Variant、Double、Long、String……等多種數據類型數組排序。 Option ExplicitPrivate Sub QuicksortInt(list() As Integer, ByVal min As Integer, ByVal max As Intege...
  • [Visual Basic]VB 不用API實現創建多層文件夾2011-02-04 10:52:41 |
    · VB 不用API實現創建多級目錄的函數: Option ExplicitPublic Function CreateDir(path As String) As Boolean Static start, pos As Integer Static directory As String Static result As Boolean result = True ...

總數:174/6 首頁 上一頁 1 2 3 4 5 6 下一頁 末頁

秒速时时彩