Skip to content

好想睡觉

2012 May 11
by Yuan

每当想不到如何做。我就想睡觉

kukup trip

2012 May 7
by Yuan

image

image

image

image

post from phone

2012 May 7
by Yuan

image

\^O^/

Read & Write & Select File Or Folder

2012 May 7
by Yuan
    Public Function GetFileContents(ByVal FullPath As String, _
           Optional ByRef ErrInfo As String = "") As String
 
        Dim strContents As String
        Dim objReader As StreamReader
        Try
 
            objReader = New StreamReader(FullPath)
            strContents = objReader.ReadToEnd()
            objReader.Close()
            Return strContents
        Catch Ex As Exception
            ErrInfo = Ex.Message
        End Try
    End Function
 
    Public Function SaveTextToFile(ByVal strData As String, _
     ByVal FullPath As String, _
       Optional ByVal ErrInfo As String = "") As Boolean
 
        Dim Contents As String
        Dim bAns As Boolean = False
        Dim objReader As StreamWriter
        Try
 
            objReader = New StreamWriter(FullPath)
            objReader.Write(strData)
            objReader.Close()
            bAns = True
        Catch Ex As Exception
            ErrInfo = Ex.Message
 
        End Try
        Return bAns
    End Function
        Dim myOpenFileDialog As New OpenFileDialog
        'myOpenFileDialog.Filter = "Excel Files(*.xls)|*.xlsx"
        Dim result = myOpenFileDialog.ShowDialog
 
        If result = 1 Then
            ButtonEdit1.EditValue = myOpenFileDialog.FileName
            If File.Exists(ButtonEdit1.EditValue) Then
                tHardwareID.EditValue = GetFileContents(ButtonEdit1.EditValue)
            End If
        End If
        Dim myOpenFileDialog As New FolderBrowserDialog
        Dim result = myOpenFileDialog.ShowDialog
 
        If result = 1 Then
            tExportPath.EditValue = myOpenFileDialog.SelectedPath
        End If

An error occurred while validating. HRESULT = ’8000000A’

2012 March 6
by Yuan

At Problem Setup Project – right click “Detected Dependencies” and “Refresh Dependencies”. This works in vs.net 2010