用户登录  |  用户注册
首 页源码下载网络学院最新源码源码排行屏蔽广告
当前位置:新兴网络 > 网络学院 > 标签 > 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.newxing.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 下一页 末页