Hi,
I do have exception handlers, which write all the exception to a file, but
there isn't any exception written to the file...
Some strange thing also: I tried to see where the error happens, by writing
every other line a small message to a file. And it never wrote one...
like this:
Private Sub frmMain_Load(By Val sender As Object, ByVal e As
System.EventArg s) Handles Me.Load
MessageSilent(" GlobalErrorHand ler")
'error-handeler
AddHandler System.Windows. Forms.Applicati on.ThreadExcept ion,
AddressOf GlobalErrorHand ler
MessageSilent(" Info.ProductNam e")
Me.Text = My.Application. Info.ProductNam e & " - version " &
My.Application. Info.Version.To String
MessageSilent(" Test Connection")
When I don't put the MessageSilent-log-writers in it, the Me.Text = .. is
executed (because I can see it in the caption), but with the MessageSilent
it doesn't change the caption...
To be complete: this is the wholce MessageSilent-method:
Public Sub MessageSilent(B yVal strMessage As String, Optional ByVal
strCaption As String = "")
Dim swFile As StreamWriter
swFile = New StreamWriter(Ap plication.Start upPath & "\" &
strErrorFile, True, System.Text.Enc oding.GetEncodi ng(1252))
If strMessage.Leng th > 0 Then
swFile.WriteLin e(Format(Now, "dd/MM/yyyy HH:mm:ss fffffff ") &
"MessageSil ent: " & strCaption & " - " & strMessage)
Else
swFile.WriteLin e(Format(Now, "dd/MM/yyyy HH:mm:ss fffffff ") &
"MessageSil ent: ")
End If
swFile.Flush()
swFile.Close()
End Sub
"Carlos J. Quintero [VB MVP]" <ca*****@NOSPAM sogecable.com> wrote in message
news:O3******** ******@TK2MSFTN GP11.phx.gbl...
Hi Pieter,
Some ideas:
- Do you have exception handlers to trap exceptions?
- Develop and debug as a non-admin. See these resources about developing
as non-admin :
http://www.mztools.com/resources_net...s.htm#NonAdmin
--
Best regards,
Carlos J. Quintero
MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com