這程式用 Vb.net 開發 請自行準備 .net framework 3.5

 
 

dark99 發表在 痞客邦 留言(0) 人氣()

一段範例如下



<DT><H3 ADD_DATE="1312850481" LAST_MODIFIED="1319985361">書籤工具列</H3>
        <DL><p>
            <DT><H3 ADD_DATE="1312850481" LAST_MODIFIED="1319985363">Android___</H3>
            <DL><p>
                <DT><A HREF="http://gphonefans.net/forum-49-3.html" ADD_DATE="1310539680" LAST_MODIFIED="1319985346">Android 軟件及遊戲討論 - GPhonefans.net</A>
                <DT><A HREF="http://www.soft4fun.net/website-recommand/10%E5%80%8B-android-%E5%85%8D%E8%B2%BB-app-%E4%B8%8B%E8%BC%89%E3%80%81%E4%BB%8B%E7%B4%B9%E7%B6%B2%E7%AB%99.htm" ADD_DATE="1310722061" LAST_MODIFIED="1319985346">10個 Android 免費 APP 下載、介紹網站 | 硬是要學</A>
                <DT><A HREF="http://www.freewarelovers.com/android/category/system" ADD_DATE="1310740049" LAST_MODIFIED="1319985346">Android Freeware: Browse the SYSTEM category</A> 


dark99 發表在 痞客邦 留言(0) 人氣()

剛剛逛到 MSDN 搜尋到 一些參考資料
還不錯用喔
[Library][C#]USkin 視窗換膚函式庫
http://www.dotblogs.com.tw/larrynung/archive/2009/08/28/10301.aspx

dark99 發表在 痞客邦 留言(0) 人氣()

這個網站裡面有  300 多個 時鐘
自己挑選喔
http://s61.photobucket.com/albums/h73/webklokken/?start=0

dark99 發表在 痞客邦 留言(0) 人氣()

HTTP GET/POST 調用方法 VB.NET
 

    'httpsend_get("http://www.zzip.com.cn/?id=12")
    Function httpsend_get(ByVal geturl As String) As String
        Dim myHttpWebRequest As System.Net.HttpWebRequest
        Dim myHttpWebResponse As System.Net.HttpWebResponse
        Try
            Dim URL As String = geturl
            Dim myUri As Uri = New Uri(geturl)
            Dim myWebRequest As System.Net.WebRequest = System.Net.WebRequest.Create(URL)
            myHttpWebRequest = CType(myWebRequest, System.Net.HttpWebRequest)
            myHttpWebRequest.KeepAlive = True
            myHttpWebRequest.Timeout = 300000
            myHttpWebRequest.Method = "GET"
            Dim myWebResponse As System.Net.WebResponse = myHttpWebRequest.GetResponse()

            '獲得響應信息
            myHttpWebResponse = CType(myWebResponse, System.Net.HttpWebResponse)
            Dim iStatCode As Integer = CInt(myHttpWebResponse.StatusCode)
            myHttpWebRequest = CType(myWebRequest, System.Net.HttpWebRequest)
            myHttpWebResponse = CType(myWebResponse, System.Net.HttpWebResponse)
            Dim myStream As System.IO.Stream = myHttpWebResponse.GetResponseStream()
            Dim srReader As System.IO.StreamReader = New System.IO.StreamReader(myStream, System.Text.Encoding.Default)
            Dim sTemp As String = srReader.ReadToEnd()
            httpsend_get = sTemp
            srReader.Close()
            myStream.Close()
            myWebResponse.Close()
            myWebRequest.Abort()
        Catch WebExcp As System.Net.WebException
            'Response.Write(Replace(WebExcp.Message.ToString(), "The remote server returned an error: (500) Internal Server Error.", "服務器出現故障無法連接"))
            httpsend_get = Replace(WebExcp.Message.ToString(), "The remote server returned an error: (500) Internal Server Error.", "服務器出現故障無法連接")
        Catch ex As Exception
            'Response.Write(ex.ToString())
            httpsend_get = ex.ToString
        End Try
    End Function
    '===========================================================================================
    'HTTP請求/回應 _END
    '===========================================================================================
    'HTTP讀取
    'HTTP 1.1 POST方式
    'geturl=網址
    'other=?號後面的參數
    Function http_post(ByVal geturl As String, ByVal text As String) As String
        Dim myHttpWebRequest As System.Net.HttpWebRequest
        Dim myHttpWebResponse As System.Net.HttpWebResponse
        Try
            Dim URL As String = geturl
            Dim myUri As Uri = New Uri(geturl)
            Dim myWebRequest As System.Net.WebRequest = System.Net.WebRequest.Create(URL)
            myHttpWebRequest = CType(myWebRequest, System.Net.HttpWebRequest)
            myHttpWebRequest.KeepAlive = True
            myHttpWebRequest.Timeout = 3000000
            myHttpWebRequest.Method = "POST"
            Dim postdata As String = URLEncoding(text)
            Dim encoding As New System.Text.ASCIIEncoding
            Dim byte1 As Byte() = encoding.GetBytes(postdata)
            myHttpWebRequest.ContentType = "application/x-www-form-urlencoded"
            myHttpWebRequest.ContentLength = postdata.Length
            Dim newStream As System.IO.Stream = myHttpWebRequest.GetRequestStream()
            newStream.Write(byte1, 0, byte1.Length)
            newStream.Close()
            Dim myWebResponse As System.Net.WebResponse = myHttpWebRequest.GetResponse()
            myHttpWebResponse = CType(myWebResponse, System.Net.HttpWebResponse)
            Dim iStatCode As Integer = CInt(myHttpWebResponse.StatusCode)
            myHttpWebResponse = CType(myWebResponse, System.Net.HttpWebResponse)
            Dim myStream As System.IO.Stream = myHttpWebResponse.GetResponseStream()
            Dim srReader As System.IO.StreamReader = New System.IO.StreamReader(myStream, encoding.Default)
            Dim sTemp As String = srReader.ReadToEnd()
            http_post = sTemp
            srReader.Close()
            myStream.Close()
            myWebResponse.Close()
            myWebRequest.Abort()
        Catch WebExcp As System.Net.WebException
            http_post = Replace(WebExcp.Message.ToString(), "The remote server returned an error: (500) Internal Server Error.", "服務器出現故障無法連接")
        Catch ex As Exception
            http_post = ex.ToString()
        End Try
    End Function
    'Unicode轉換
    Function URLEncoding(ByVal vstrIn) As String
        Dim strReturn As String
        Dim i As Integer
        Dim ThisChr As String
        Dim innerCode As Integer
        Dim Hight8 As Integer
        Dim Low8 As Integer
        strReturn = ""
        For i = 1 To Len(vstrIn)
            ThisChr = Mid(vstrIn, i, 1)
            If Math.Abs(Asc(ThisChr)) < &HFF Then
                strReturn = strReturn & ThisChr
            Else
                innerCode = Asc(ThisChr)
                If innerCode < 0 Then
                    innerCode = innerCode + &H10000
                End If
                Hight8 = (innerCode And &HFF00) \ &HFF
                Low8 = innerCode And &HFF
                strReturn = strReturn & "%" & Hex(Hight8) & "%" & Hex(Low8)
            End If
        Next
        URLEncoding = strReturn
        strReturn = Nothing
        i = Nothing
        ThisChr = Nothing
        innerCode = Nothing
        Hight8 = Nothing
        Low8 = Nothing
    End Function
    '反解 URLEncoding
    Function UTF2GB(ByVal UTFStr)
        Dim gbstr
        Dim dig
        For dig = 1 To Len(UTFStr)
            If Mid(UTFStr, dig, 1) = "%" Then
                If Len(UTFStr) >= dig + 8 Then
                    gbstr = gbstr & ConvChinese(Mid(UTFStr, dig, 9))
                    dig = dig + 8
                Else
                    gbstr = gbstr & Mid(UTFStr, dig, 1)
                End If
            Else
                gbstr = gbstr & Mid(UTFStr, dig, 1)
            End If
        Next
        UTF2GB = gbstr
    End Function
    Function ConvChinese(ByVal x)
        Dim A = Split(Mid(x, 2), "%")
        Dim i = 0
        Dim j = 0
        Dim un_icode
        Dim digs
        For i = 0 To UBound(A)
            A(i) = c16to2(A(i))
        Next
        For i = 0 To UBound(A) - 1
            digs = InStr(A(i), "0")
            un_icode = ""
            For j = 1 To digs - 1
                If j = 1 Then
                    A(i) = Right(A(i), Len(A(i)) - digs)
                    un_icode = un_icode & A(i)
                Else
                    i = i + 1
                    A(i) = Right(A(i), Len(A(i)) - 2)
                    un_icode = un_icode & A(i)
                End If
            Next
            If Len(c2to16(un_icode)) = 4 Then
                ConvChinese = ConvChinese & ChrW(Int("&H" & c2to16(un_icode)))
            Else
                ConvChinese = ConvChinese & Chr(Int("&H" & c2to16(un_icode)))
            End If
        Next
    End Function
    Function c2to16(ByVal x)
        Dim i = 1
        For i = 1 To Len(x) Step 4
            c2to16 = c2to16 & Hex(c2to10(Mid(x, i, 4)))
        Next
    End Function
    Function c2to10(ByVal x)
        c2to10 = 0
        If x = "0" Then Exit Function
        Dim i = 0
        For i = 0 To Len(x) - 1
            If Mid(x, Len(x) - i, 1) = "1" Then c2to10 = c2to10 + 2 ^ (i)
        Next
    End Function
    Function c16to2(ByVal x)
        Dim i = 0
        Dim tempstr
        For i = 1 To Len(Trim(x))
            tempstr = c10to2(CInt(Int("&h" & Mid(x, i, 1))))
            Do While Len(tempstr) < 4
                tempstr = "0" & tempstr
            Loop
            c16to2 = c16to2 & tempstr
        Next
    End Function
    Function c10to2(ByVal x)
        Dim mysign = System.Math.Sign(x)
        Dim tempnum
        Dim i
        x = System.Math.Abs(x)
        Dim DigS = 1
        Do
            If x < 2 ^ DigS Then
                Exit Do
            Else
                DigS = DigS + 1
            End If
        Loop
        tempnum = x
        i = 0
        For i = DigS To 1 Step -1
            If tempnum >= 2 ^ (i - 1) Then
                tempnum = tempnum - 2 ^ (i - 1)
                c10to2 = c10to2 & "1"
            Else
                c10to2 = c10to2 & "0"
            End If
        Next
        If mysign = -1 Then c10to2 = "-" & c10to2
    End Function

dark99 發表在 痞客邦 留言(0) 人氣()

本文轉
http://63.236.73.220/showpost.php?s=74a3f46cfed0f447c52f3435fa53bae1&p=3497640&postcount=9
 
Imports System
Imports System.Net.Sockets
Imports System.Text
Imports System.IO
Module POP3Message1
Dim Server As TcpClient
Dim NetStrm As NetworkStream
Dim RdStrm As StreamReader
Dim _Strm As Net.Security.SslStream
Public Function connect() As Integer
Dim POP3Account As String
POP3Account = "pop.gmail.com"
If POP3Account.Trim = "" Then Exit Function
Try
Server = New TcpClient(POP3Account.Trim, 995)
NetStrm = Server.GetStream
_Strm = New Net.Security.SslStream(Server.GetStream())
DirectCast(_Strm, Net.Security.SslStream).AuthenticateAsClient("pop.gmail.com")
RdStrm = New StreamReader(Server.GetStream)
Catch exc As Exception
MsgBox(exc.Message)
Exit Function
End Try

dark99 發表在 痞客邦 留言(0) 人氣()

如何要在一個儲存格 多行顯示
請參考這篇連結
http://www.dotblogs.com.tw/chou/archive/2011/10/23/46092.aspx
 

dark99 發表在 痞客邦 留言(0) 人氣()

這邊以連結 為主
 
英文區
http://63.236.73.220/forumdisplay.php?s=74a3f46cfed0f447c52f3435fa53bae1&f=25

dark99 發表在 痞客邦 留言(0) 人氣()

DataGridView新特色、常用操作 列操作 c# dataGridView1.Columns.Insert
 
[推薦]DataGridView新特色、常用操作
1、自定義列 srxljl
Customize Cells and Columns in the Windows Forms DataGridView Control by Extending Their
     Behavior and Appearance
     Host Controls in Windows Forms DataGridView Cells
     繼承 DataGridViewTextBoxCell 類生成新的Cell類,然後再繼承 DataGridViewColumn 生成新的Column類,並指定
     CellTemplate為新的Cell類。新生成的Column便可以增加到DataGridView中去。
2、自動適應列寬 srxljl
Programmatically Resize Cells to Fit Content in the Windows Forms DataGridView Control
     Samples:

dark99 發表在 痞客邦 留言(0) 人氣()

本身手機 已經 OTA 2.3.3
本來 參考
http://lbear.pixnet.net/blog/post/29225516?comment_page=3
連第一關都過不了

dark99 發表在 痞客邦 留言(0) 人氣()

全文轉貼於
http://bbs.hiapk.com/thread-1010193-1-1.html
主要是備份用 因為太難找資料了
 

dark99 發表在 痞客邦 留言(2) 人氣()

2011-10-31 14 51 59.jpg
從網路上收集的 免費資源
http://picfoco.com/
 

dark99 發表在 痞客邦 留言(0) 人氣()

Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。