|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Whats thisPublic Sub WriteLogEntry( _ ByVal logName As String, _ ByVal logSource As String, _ ByVal logEntry As String, _ ByVal logType As System.Diagnostics.EventLogEntryType, _ ByVal logID As Integer, _ ByVal category As Short) 'Arguments : logName - The name of the log ' logSource - The source that writes the log ' logEntry - The text of the new message to log ' logType - The type of log to enter (error, failure ' audit, information, success audit, warning) ' logID - An integer that sets the entry's ID ' category - The category for the entry Dim myLog As New System.Diagnostics.EventLog() myLog.Log = logName ' Create the source, if it does not already exist. If Not System.Diagnostics.EventLog.SourceExists(logSource) Then System.Diagnostics.EventLog.CreateEventSource(logSource, logName) End If myLog.WriteEntry(logSource, logEntry, logType, logID, category) End Sub IN THE ide OF vs2005 i get Warning 1 Access of shared member, constant member, enum member or nested type through an instance; qualifying expression will not be evaluated. D:\ProjetsVBNet\test\Form1.vb 84 9 test on word in last line mylog. OK I'll play, what's it mean and what do I have to do to fix this? Any help appreciated. Bob "Bob" <bduf***@sgiims.com> wrote in message but not any language this group supports....news:OvNKk6pJGHA.524@TK2MSFTNGP09.phx.gbl... > This code works in vs2003 vb.net You'll want to post that question in a .Net group. They all contain "dotnet" or "vsnet" in their names. This and all other groups on the MS server that start with "microsoft.public.vb" are for VB Classic (mostly VB5/6) and were in existance long before any .Net products were released. While some of the code looks the same, they are very different products and require a different set of groups. Try one of these: news://news.microsoft.com/microsoft.public.dotnet.general news://news.microsoft.com/microsoft.public.dotnet.languages.vb news://news.microsoft.com/microsoft.public.dotnet.languages.vb.controls news://news.microsoft.com/microsoft.public.dotnet.framework.interop -- Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com Please keep all discussions in the groups.. "Bob" <bduf***@sgiims.com> wrote in message Oops... It's ME that's in the wrong group! Now that's a new one! :-)news:OvNKk6pJGHA.524@TK2MSFTNGP09.phx.gbl... > This code works in vs2003 vb.net Sorry 'bout dat -- Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com Please keep all discussions in the groups.. "Bob" <bduf***@sgiims.com> schrieb: Simply replace the text in front of the method call/member access with the > Warning 1 Access of shared member, constant member, enum member or nested > type through an instance; qualifying expression will not be evaluated. > D:\ProjetsVBNet\test\Form1.vb 84 9 test on word in last line mylog. name of the class that contains the member instead of an object reference. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
Comparing 2 datatables...
how do you execute javascript after script is regsistered? Outlook.MaiIteml.Move: The RPC server is not available Can't View Form in Designer Visual Basic .NET 2005 Express Dragging a file from Windows into My program Dynamic Menus with Events ComboBox Rounded form corners and a custom title bar Using Winsock / TCP Client how do I enable the scrollbars in my textbox |
|||||||||||||||||||||||