Click here to Skip to main content
15,913,758 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Anyone please help me.....Procedure not shown in my report. Pin
andyharman20-Feb-07 0:34
professionalandyharman20-Feb-07 0:34 
QuestionEmail Host Pin
The ANZAC19-Feb-07 18:47
The ANZAC19-Feb-07 18:47 
AnswerRe: Email Host Pin
Christian Graus19-Feb-07 19:07
protectorChristian Graus19-Feb-07 19:07 
GeneralRe: Email Host Pin
The ANZAC19-Feb-07 19:30
The ANZAC19-Feb-07 19:30 
GeneralRe: Email Host Pin
The ANZAC19-Feb-07 20:03
The ANZAC19-Feb-07 20:03 
QuestionDatagrid in vb.net Pin
Pertik Garg19-Feb-07 18:16
Pertik Garg19-Feb-07 18:16 
AnswerRe: Datagrid in vb.net Pin
GoodID19-Feb-07 21:10
GoodID19-Feb-07 21:10 
AnswerRe: Datagrid in vb.net Pin
NanaAM20-Feb-07 0:54
NanaAM20-Feb-07 0:54 
QuestionReset an integer Pin
rudemusik19-Feb-07 15:38
rudemusik19-Feb-07 15:38 
AnswerRe: Reset an integer Pin
Christian Graus19-Feb-07 19:10
protectorChristian Graus19-Feb-07 19:10 
GeneralRe: Reset an integer Pin
rudemusik20-Feb-07 13:20
rudemusik20-Feb-07 13:20 
GeneralRe: Reset an integer Pin
TwoFaced20-Feb-07 18:32
TwoFaced20-Feb-07 18:32 
GeneralRe: Reset an integer Pin
rudemusik21-Feb-07 5:31
rudemusik21-Feb-07 5:31 
AnswerRe: Reset an integer Pin
lucky.prem19-Feb-07 20:03
lucky.prem19-Feb-07 20:03 
GeneralRe: Reset an integer Pin
rudemusik20-Feb-07 13:28
rudemusik20-Feb-07 13:28 
QuestionRead last line of logfile and close file immediately Pin
bodobe19-Feb-07 10:10
bodobe19-Feb-07 10:10 
AnswerRe: Read last line of logfile and close file immediately Pin
Marcus J. Smith19-Feb-07 10:14
professionalMarcus J. Smith19-Feb-07 10:14 
GeneralRe: Read last line of logfile and close file immediately Pin
bodobe19-Feb-07 10:23
bodobe19-Feb-07 10:23 
GeneralRe: Read last line of logfile and close file immediately Pin
Marcus J. Smith19-Feb-07 10:29
professionalMarcus J. Smith19-Feb-07 10:29 
GeneralRe: Read last line of logfile and close file immediately Pin
bodobe19-Feb-07 10:40
bodobe19-Feb-07 10:40 
GeneralRe: Read last line of logfile and close file immediately Pin
Marcus J. Smith19-Feb-07 10:47
professionalMarcus J. Smith19-Feb-07 10:47 
AnswerRe: Read last line of logfile and close file immediately Pin
TwoFaced19-Feb-07 13:06
TwoFaced19-Feb-07 13:06 
GeneralRe: Read last line of logfile and close file immediately Pin
bodobe20-Feb-07 20:43
bodobe20-Feb-07 20:43 
Hi, thanks a lot, works great! I only had to place the IO.File.Open(...) into a Try..Catch, because the FileSystemWatche raises the FileChanged-Event a bit too early: File has been changed, but not yet been closed by the other software.

While LogReadPermission <> True
Try
stream = IO.File.Open(LogFile, FileMode.Open, FileAccess.Read)
LogReadPermission = True 'if stream has been opened without exception, allow reading and leave 'while'
Catch ex As Exception
Threading.Thread.Sleep(5) 'short wait before next try
i += 1
If i > 100 Then
MsgBox("Logfile not found! " & ex.ToString)
End If
End Try

End While
stream.Position = Index
stream.Read(buf, 0, count)
...
GeneralRe: Read last line of logfile and close file immediately Pin
TwoFaced20-Feb-07 21:32
TwoFaced20-Feb-07 21:32 
GeneralRe: Read last line of logfile and close file immediately Pin
Marcus J. Smith23-Feb-07 5:20
professionalMarcus J. Smith23-Feb-07 5:20 

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.