Click here to Skip to main content
15,916,702 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Scanning With Kodac Scanner Pin
Project Leader19-Jun-05 18:50
Project Leader19-Jun-05 18:50 
Generalinstallable version of my vb6 program Pin
a_yosef18-Jun-05 0:28
a_yosef18-Jun-05 0:28 
GeneralRe: installable version of my vb6 program Pin
Dave Kreskowiak18-Jun-05 5:05
mveDave Kreskowiak18-Jun-05 5:05 
GeneralRe: installable version of my vb6 program Pin
a_yosef19-Jun-05 22:57
a_yosef19-Jun-05 22:57 
GeneralRe: installable version of my vb6 program Pin
Dave Kreskowiak20-Jun-05 1:17
mveDave Kreskowiak20-Jun-05 1:17 
GeneralLog File Pin
LordLothar17-Jun-05 16:39
LordLothar17-Jun-05 16:39 
GeneralRe: Log File Pin
Christian Graus17-Jun-05 21:36
protectorChristian Graus17-Jun-05 21:36 
GeneralRe: Log File Pin
Len Miller17-Jun-05 21:49
Len Miller17-Jun-05 21:49 
If you want to write to an O/S filesystem (text) file - see help on file streams and text files (I assume you do not need this). See System.IO namespace.

To log to the windows event log (I assume this is what you want something like this):

Private Shared Sub WriteToAppLog( _
ByVal message As String _
, ByVal messageType As EventLogEntryType _
)
Dim elLog As System.Diagnostics.EventLog
Try
elLog = New System.Diagnostics.EventLog( _
"Application" _
, Environment.MachineName _
, Application.ProductName _
)
elLog.WriteEntry(message, messageType)
Catch ex As Exception
'Your error handling here
End Try
End Sub

I suggest you write a reusable application-message class handling messages to user/screen, text log file or Windows Event log (or any combination there in).
Use <flags()> designation before your enum declaration to "OR" these options together in a bitwise fashion.

Good luck,
-Len


Thanks,
-Len Miller

"If I had eight hours to chop down a tree, I'd spend six sharpening my axe."
-Abraham Lincoln
GeneralRe: Log File Pin
Robert Rohde17-Jun-05 23:23
Robert Rohde17-Jun-05 23:23 
GeneralServiced Component Pin
lagumaster17-Jun-05 14:57
lagumaster17-Jun-05 14:57 
GeneralRe: Serviced Component Pin
Rizwan Bashir18-Jun-05 3:31
Rizwan Bashir18-Jun-05 3:31 
GeneralRe: Serviced Component Pin
lagumaster18-Jun-05 7:15
lagumaster18-Jun-05 7:15 
GeneralRe: Serviced Component Pin
Rizwan Bashir19-Jun-05 21:49
Rizwan Bashir19-Jun-05 21:49 
GeneralProblems with ds.HasChanges and BindingManagerBase Pin
Len Miller17-Jun-05 14:15
Len Miller17-Jun-05 14:15 
GeneralProject Help Pin
James Sheldon17-Jun-05 11:07
sussJames Sheldon17-Jun-05 11:07 
GeneralRe: Project Help Pin
Len Miller17-Jun-05 21:30
Len Miller17-Jun-05 21:30 
GeneralI am very new to vb.NET. Pin
jetski441917-Jun-05 10:56
jetski441917-Jun-05 10:56 
GeneralRe: I am very new to vb.NET. Pin
jonathan1520-Jun-05 2:57
jonathan1520-Jun-05 2:57 
QuestionArea optimization? Pin
Member 187046717-Jun-05 10:27
Member 187046717-Jun-05 10:27 
GeneralVB.NET - VS.NET 2005 Pin
Moonark17-Jun-05 10:11
Moonark17-Jun-05 10:11 
GeneralListbox Pin
JimClark6817-Jun-05 8:44
JimClark6817-Jun-05 8:44 
GeneralRe: Listbox Pin
Dave Kreskowiak17-Jun-05 10:11
mveDave Kreskowiak17-Jun-05 10:11 
GeneralRe: Listbox Pin
Anonymous17-Jun-05 14:41
Anonymous17-Jun-05 14:41 
GeneralTextbox does not update database Pin
dptalt17-Jun-05 8:10
dptalt17-Jun-05 8:10 
GeneralGlobal forcing of numeric only textboxes Pin
Trey549817-Jun-05 7:04
Trey549817-Jun-05 7:04 

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.