Click here to Skip to main content
15,915,508 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questiondll Problem in vb 6.0 Pin
bony_baba4-Jul-06 4:02
bony_baba4-Jul-06 4:02 
Questiongood day to all... Pin
moodsey2114-Jul-06 3:08
moodsey2114-Jul-06 3:08 
AnswerRe: good day to all... Pin
Colin Angus Mackay4-Jul-06 12:20
Colin Angus Mackay4-Jul-06 12:20 
AnswerRe: good day to all... Pin
Mekong River4-Jul-06 15:50
Mekong River4-Jul-06 15:50 
AnswerRe: good day to all... Pin
Socheat.Net4-Jul-06 22:38
Socheat.Net4-Jul-06 22:38 
GeneralRe: good day to all... Pin
Mekong River5-Jul-06 0:22
Mekong River5-Jul-06 0:22 
QuestionDVT camera and VB.NET 2003 std Pin
porsti4-Jul-06 3:05
porsti4-Jul-06 3:05 
QuestionApplication log Pin
jon-804-Jul-06 0:46
professionaljon-804-Jul-06 0:46 
I am using a function to keep an error log in case of run-time errors. When the program breaks, ex.stacktrack and ex.innerexception, containing useful technical information are not written to the log file.

Any ideas?

Jon
:->

Code:

Friend Sub DisplayError(ByVal Caption As String, ByVal ErrorMessage As String, _
ByVal LogError As Boolean, Optional ByVal InnerException As String = " ", _
Optional ByVal StackTrace As String = " ")

' Displays an error message and logs the error
If Caption = "" Then
MessageBox.Show(ErrorMessage, Caption, MessageBoxButtons.OK, MessageBoxIcon.Error)
Else
MessageBox.Show(ErrorMessage, Caption, MessageBoxButtons.OK, MessageBoxIcon.Error)
End If

If LogError = True Then
'Log the error message in a text file
Dim ErrorLog As New StreamWriter(strAppPath & "\" & "Error.log", True)
Const strDelimiter As String = ","

Try
ErrorLog.Write(Now.ToString)
ErrorLog.WriteLine(strDelimiter & Caption & _
strDelimiter & ErrorMessage & _
strDelimiter & InnerException)
Finally
ErrorLog.Close()
End Try
End If
End Sub

Jon
AnswerRe: Application log Pin
Guffa4-Jul-06 1:06
Guffa4-Jul-06 1:06 
GeneralRe: Application log Pin
jon-804-Jul-06 5:39
professionaljon-804-Jul-06 5:39 
QuestionError-->strType = CType(sender, MenuItem).Text. Kindly reply a working solution for this. Pin
bpoojas3-Jul-06 23:45
bpoojas3-Jul-06 23:45 
GeneralRe: Error-->strType = CType(sender, MenuItem).Text. Kindly reply a working solution for this. Pin
Guffa4-Jul-06 1:02
Guffa4-Jul-06 1:02 
QuestionNET-1.1: Owner Draw Context Menu Pin
Marco Turrini3-Jul-06 23:17
Marco Turrini3-Jul-06 23:17 
QuestionGet thumbnail for files other than images Pin
JohnWillemse3-Jul-06 22:24
JohnWillemse3-Jul-06 22:24 
QuestionForm Border Style Pin
militiaware3-Jul-06 21:32
militiaware3-Jul-06 21:32 
AnswerRe: Form Border Style Pin
Simple programmer3-Jul-06 23:10
Simple programmer3-Jul-06 23:10 
GeneralRe: Form Border Style Pin
militiaware3-Jul-06 23:21
militiaware3-Jul-06 23:21 
GeneralRe: Form Border Style [modified] Pin
Duncan Edwards Jones3-Jul-06 23:31
professionalDuncan Edwards Jones3-Jul-06 23:31 
QuestionChat Pin
Socheat.Net3-Jul-06 21:16
Socheat.Net3-Jul-06 21:16 
AnswerRe: Chat Pin
PlayByTheRules3-Jul-06 22:17
PlayByTheRules3-Jul-06 22:17 
GeneralRe: Chat Pin
Socheat.Net3-Jul-06 22:34
Socheat.Net3-Jul-06 22:34 
GeneralRe: Chat Pin
Colin Angus Mackay4-Jul-06 12:25
Colin Angus Mackay4-Jul-06 12:25 
GeneralRe: Chat Pin
Socheat.Net4-Jul-06 21:09
Socheat.Net4-Jul-06 21:09 
GeneralRe: Chat Pin
Colin Angus Mackay5-Jul-06 9:09
Colin Angus Mackay5-Jul-06 9:09 
GeneralRe: Chat Pin
Socheat.Net5-Jul-06 21:27
Socheat.Net5-Jul-06 21:27 

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.