当前位置: 网学 > 编程文档 > VB > 正文

用VB编写留言板

来源:Http://myeducs.cn 联系QQ:点击这里给我发消息 作者: 用户投稿 来源: 网络 发布时间: 12/10/16
下载{$ArticleTitle}原创论文样式
teFile hStdOut, s, LenB(StrConv(s, vbFromUnicode)), lBytesWritten, ByVal 0&
End Sub
  '' 本函数用于对用户输入的数据进行解码
Public Function UrlDecode(ByVal sEncoded As String) As String
Dim pointer As Long, pos As Long
Dim temp As String
    If sEncoded = "" Then Exit Function
    pointer = 1
      Do      '' 该循环对系统保留字和汉字进行处理
        pos = InStr(pointer, sEncoded, "%")
           If pos = 0 Then Exit Do
        temp = Chr("&H" & (Mid(sEncoded, pos + 1, 2)))
           If Mid(sEncoded, pos + 3, 1) = "%" And (temp <> ":") _
              And (temp <> "\") And (temp <> "/") Then
           Mid(sEncoded, pos, 2) = Chr("&H" & (Mid(sEncoded, pos + 1, 2)) _
              & (Mid(sEncoded, pos + 4, 2)))
              sEncoded = Left(sEncoded, pos) & Mid(sEncoded, pos + 6)
              pointer = pos + 1
               Else
           Mid(sEncoded, pos, 1) = temp
              sEncoded = Left(sEncoded, pos) & Mid(sEncoded, pos + 3)
              pointer = pos + 1
           End If
      Loop
    UrlDecode = sEncoded
End Function
'' 本函数用于对输入的“Name = Value”数据对进行分解
Public Function FenGe(Cstring As String) As String
Dim I As Integer, j As Integer, add As Integer
j = 1
   Do While InStr(Cstring, "&") <> 0
        I = InStr(Cstring, "&")
        StrData(j) = Mid(Mid(Cstring, 1, I - 1), InStr(Mid(Cstring, 1, I - 1), "=") + 1)
          j = j + 1
        Cstring = Mid(Cstring, I + 1)
   Loop
      StrData(j) = Mid(Cstring, InStr(Cstring, "=") + 1)
For I = 1 To j    '' 该循环用于把字符串内的“+”还原为空格
    Do
   
  • 下一篇资讯: 如何用API定义程序热键
  • 网学推荐

    免费论文

    原创论文

    浏览:
    设为首页 | 加入收藏 | 论文首页 | 论文专题 | 设计下载 | 网学软件 | 论文模板 | 论文资源 | 程序设计 | 关于网学 | 站内搜索 | 网学留言 | 友情链接 | 资料中心
    版权所有 QQ:3710167 邮箱:3710167@qq.com 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
    Copyright 2008-2015 myeducs.Cn www.myeducs.Cn All Rights Reserved
    湘ICP备09003080号