Click here to Skip to main content
15,888,803 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: problems with configuration settings Pin
TigerNinja_18-May-04 6:05
TigerNinja_18-May-04 6:05 
GeneralValidation Controls Question Pin
gmhanna16-May-04 9:56
gmhanna16-May-04 9:56 
GeneralRe: Validation Controls Question Pin
Mike Ellison18-May-04 20:07
Mike Ellison18-May-04 20:07 
GeneralHELP! Reading Files... Pin
mikasa15-May-04 12:23
mikasa15-May-04 12:23 
GeneralRe: HELP! Reading Files... Pin
mikasa15-May-04 12:40
mikasa15-May-04 12:40 
GeneralRe: HELP! Reading Files... Pin
mikasa15-May-04 12:59
mikasa15-May-04 12:59 
GeneralRe: HELP! Reading Files... Pin
TigerNinja_20-May-04 8:34
TigerNinja_20-May-04 8:34 
GeneralRe: HELP! Reading Files... Pin
mikasa20-May-04 8:46
mikasa20-May-04 8:46 
Sure thing, just curious if anyone would reply Poke tongue | ;-P

'Function to Read a File into Cache so RegEx can be Performed
Private Sub CacheFile(ByVal File As String)
	Dim ioReader As IO.StreamReader
	Dim vBuffer() As Char
	Dim hResult As Integer

	'Exit if the File does not exist
	If (File = "") Then Return
	If (Not IO.File.Exists(File)) Then Return
	If (Me._File <> File) Then Me._File = File Else Return

	Try
		'Initialize the Cache
		_Cache = Nothing : _Cache = New System.Text.StringBuilder(8096)

		'Read the File
		ReDim vBuffer(8096)
		ioReader = New IO.StreamReader(File, System.Text.Encoding.UTF8, True, 8096)
		hResult = ioReader.Read(vBuffer, 0, vBuffer.Length) 'Read More Data
		While (hResult > 0)
		     'There is a bug with a StreamReader.  Sometimes more data is read than is neccessary.
		     'If these are the Last Bytes of data, only read up to the hResult
		     If (hResult < vBuffer.Length) Then _Cache.Append(vBuffer, 0, hResult) Else _Cache.Append(vBuffer, 0, vBuffer.Length)

		     hResult = ioReader.Read(vBuffer, 0, vBuffer.Length) 'Read More Data
		End While

	Catch ex As Exception : MsgBox(ex.ToString)
	Finally
		Erase vBuffer
		If (Not IsNothing(ioReader)) Then ioReader.Close() : ioReader = Nothing
	End Try
End Sub

GeneralRe: HELP! Reading Files... Pin
Colin Angus Mackay23-May-04 2:00
Colin Angus Mackay23-May-04 2:00 
GeneralRe: HELP! Reading Files... Pin
mikasa23-May-04 6:51
mikasa23-May-04 6:51 
QuestionTreeView - Howto add Controls? Pin
mgaerber14-May-04 9:23
mgaerber14-May-04 9:23 
AnswerRe: TreeView - Howto add Controls? Pin
mikasa15-May-04 13:00
mikasa15-May-04 13:00 
AnswerRe: TreeView - Howto add Controls? Pin
TigerNinja_18-May-04 19:14
TigerNinja_18-May-04 19:14 
Generalcomposite web control Pin
sangeetha bhatta13-May-04 19:10
sangeetha bhatta13-May-04 19:10 
GeneralRe: composite web control Pin
TigerNinja_14-May-04 8:01
TigerNinja_14-May-04 8:01 
General.net Pin
Yulianto.13-May-04 17:44
Yulianto.13-May-04 17:44 
GeneralRe: .net Pin
TigerNinja_14-May-04 8:05
TigerNinja_14-May-04 8:05 
GeneralTELL ME I'M WRONG !! Pin
philippe dykmans13-May-04 15:13
philippe dykmans13-May-04 15:13 
GeneralRe: TELL ME I'M WRONG !! Pin
TigerNinja_14-May-04 13:52
TigerNinja_14-May-04 13:52 
GeneralRe: TELL ME I'M WRONG !! Pin
philippe dykmans15-May-04 4:24
philippe dykmans15-May-04 4:24 
GeneralProblem with TCP in a derived UserControl Pin
Tim Kohler13-May-04 8:47
Tim Kohler13-May-04 8:47 
QuestionHow to announce Windows Service Manager, that service fails (Recovery Options) Pin
Jan Lehmann12-May-04 20:18
Jan Lehmann12-May-04 20:18 
AnswerRe: How to announce Windows Service Manager, that service fails (Recovery Options) Pin
ian mariano13-May-04 10:28
ian mariano13-May-04 10:28 
AnswerRe: How to announce Windows Service Manager, that service fails (Recovery Options) Pin
ian mariano13-May-04 10:33
ian mariano13-May-04 10:33 
GeneralSystem.Environment.MachineName Exception Pin
Member 9993512-May-04 8:40
Member 9993512-May-04 8:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.