IO.DirectoryInfo
熱3已有 155548 次閱讀 2017-04-18 18:19Imports System.IO
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim read As IO.StreamReader = New IO.StreamReader("D:\複製 -可蘭經\mkq001.htm", System.Text.Encoding.Default)
TextBox1.Text = read.ReadToEnd()
read.Close()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim read As IO.StreamReader = New IO.StreamReader("D:\複製 -可蘭經\mkq001.htm", System.Text.Encoding.Default)
TextBox1.Text = read.ReadToEnd()
read.Close()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
TextBox1.Clear()
Dim strFileSize As String = ""
Dim di As New IO.DirectoryInfo("D:\複製 -可蘭經\")
Dim aryFi As IO.FileInfo() = di.GetFiles("*.htm")
Dim fi As IO.FileInfo
TextBox1.Clear()
Dim strFileSize As String = ""
Dim di As New IO.DirectoryInfo("D:\複製 -可蘭經\")
Dim aryFi As IO.FileInfo() = di.GetFiles("*.htm")
Dim fi As IO.FileInfo
For Each fi In aryFi
TextBox1.AppendText(fi.Name & vbCrLf)
Next
End Sub
TextBox1.AppendText(fi.Name & vbCrLf)
Next
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
WebBrowser1.Navigate("")
Dim strFileSize As String = ""
Dim di As New IO.DirectoryInfo("D:\複製 -可蘭經\")
Dim aryFi As IO.FileInfo() = di.GetFiles("*.htm")
Dim fi As IO.FileInfo
WebBrowser1.Navigate("")
Dim strFileSize As String = ""
Dim di As New IO.DirectoryInfo("D:\複製 -可蘭經\")
Dim aryFi As IO.FileInfo() = di.GetFiles("*.htm")
Dim fi As IO.FileInfo
For Each fi In aryFi
TextBox1.AppendText(fi.Name & vbCrLf)
Next
End Sub
TextBox1.AppendText(fi.Name & vbCrLf)
Next
End Sub
Private Sub TextBox1_DoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.DoubleClick
TextBox2.Text = TextBox1.SelectedText
End Sub
TextBox2.Text = TextBox1.SelectedText
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
WebBrowser1.Navigate("D:\複製 -可蘭經\" & TextBox2.Text)
TextBox1.Text = WebBrowser1.Document.Body.InnerText
End Sub
End Class
WebBrowser1.Navigate("D:\複製 -可蘭經\" & TextBox2.Text)
TextBox1.Text = WebBrowser1.Document.Body.InnerText
End Sub
End Class
發表評論 評論 (0 個評論)