Dim sr As New IO.StreamReader("路徑") '打開文件
在扶溝等地區(qū),都構(gòu)建了全面的區(qū)域性戰(zhàn)略布局,加強發(fā)展的系統(tǒng)性、市場前瞻性、產(chǎn)品創(chuàng)新能力,以專注、極致的服務(wù)理念,為客戶提供網(wǎng)站設(shè)計、成都網(wǎng)站設(shè)計 網(wǎng)站設(shè)計制作按需策劃,公司網(wǎng)站建設(shè),企業(yè)網(wǎng)站建設(shè),成都品牌網(wǎng)站建設(shè),網(wǎng)絡(luò)營銷推廣,外貿(mào)營銷網(wǎng)站建設(shè),扶溝網(wǎng)站建設(shè)費用合理。
Dim str As String = sr.ReadToEnd() '讀取文本
sr.Close() '關(guān)閉流
str = "not" str '修改文字
Dim sw As New IO.StreamWriter("路徑") '打開
sw.Write(str) '寫入
sw.Close() '關(guān)閉
在WinForm項目的窗體上添加一個按鈕和文本框,然后把下面的代碼粘貼上去就可以了。
Public Function lsH(ByVal n As String) As String
Dim s1 As String = ""
Dim s2 As String = ""
Dim i As Integer = 0
Dim j As Integer
If n.Length = 1 Then
Return ("是回文數(shù)")
Else
If Tell_JiOu(n.Length) = 1 Then
j = (n.Length + 1) / 2
s1 = Mid(n, 1, j)
Else
j = n.Length / 2 + 1
s1 = Mid(n, 1, j - 1)
End If
For i = n.Length To j Step -1
s2 = s2 + Mid(n, i, 1)
Next
If s1 = s2 Then
Return "是回文數(shù)"
Else
Return "不是回文數(shù)"
End If
End If
End Function
'判斷一個整數(shù)的奇偶
Public Function Tell_JiOu(ByVal k As Integer) As Integer
If k Mod 2 = 0 Then
Return 2
Else
Return 1
End If
End Function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button1.Click
Button.Text = lsH(TextBox1.Text)
End Sub
你設(shè)計一個界面,讓別人來寫代碼,可能嗎?
另外根據(jù)你的想法,VB.NET沒法實現(xiàn),需要用C++寫DLL注入,還要破解QQ的加密函數(shù)!