Tuesday, February 22, 2011

Wednesday, February 2, 2011

Read & Write Text File in VB2005

I will now begin to compile my codes which had been very helpful to my work. The following code is used to read or write textfile which can be used for more creative output.

Imports System.IO
Public Class ReadWriteTextFile
Friend Sub WriteTextFile(ByVal filename As String, ByVal filecontent As String)
Try
Dim oFile As System.IO.File
Dim oWrite As System.IO.StreamWriter

oWrite = oFile.CreateText(filename)
oWrite.Write(filecontent)
oWrite.Close()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub


Friend Function GetFileContents(ByVal FullPath As String)
Try
Dim strContents As String
Dim objReader As System.IO.StreamReader
objReader = New StreamReader(FullPath)
strContents = objReader.ReadToEnd()
objReader.Close()
Return strContents
Catch ex As Exception
MessageBox.Show(ex.Message)

End Try
End Function
End Class

Acer Aspire One ZG5 drivers

I was recently asked to fix Acer Netbook and I had hard times looking for its drivers after I installed the operating system because this model ZG5 was not in the list from the support site of acer. After a long searching from the web I finally found this link http://www.notebook-driver.com/acer/acer-aspire-one-netbook-windows-xp-drivers/and great help.