By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,968 Members | 1,843 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,968 IT Pros & Developers. It's quick & easy.

can u fix this ...............

P: n/a
at runtime i got error right away. so i am getting closer...just 1
errors in bolds. when i do step over i found same error in bold below
An unhandled exception of type 'System.NullReferenceException' occurred
in system.windows.forms.dll
Additional information: Object reference not set to an instance of an
object.
Public Class mainPirateChat
Inherits System.Windows.Forms.Form
' Private netBots As New PirateChat.ClientFactory
Private Netsock As New PirateChat.SockFactory
Private WithEvents netBots As New PirateChat.ClientFactory
' Private WithEvents Netsock As New PirateChat.SockFactory
Private clsReader As New PirateChat.clsReadWriteXML

#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
netBots = Nothing
Netsock = Nothing
clsReader = Nothing
Dim frmPref As New PirateChat.frmPreferences
frmPref.MdiParent = Me
Dim szReConnect As Collection =
clsReader.GetConfigInfo("Misc", "ReConnect", " ", "PirateChat.xml")
Dim getReConnect As String
For Each getReConnect In szReConnect
bReconnect = CBool(getReConnect)
frmPref.chkReConn.Checked = bReconnect
Next
Dim szStartup As Collection =
clsReader.GetConfigInfo("Misc", "Startup", " ", "PirateChat.xml")
Dim getStartup As String
For Each getStartup In szStartup
bStartup = getStartup
frmPref.chkStartup.Checked = getStartup
Next
End Sub
regards,
happy new yrs every 1
from supra

Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Something is wrong with GetConfigInfo - it's not finding the values you set - the file or something b/c the collection isn't being returned. Double check all of the spelling, spaces and capitalization in your xml file.

--
W.G. Ryan, MVP

www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"Supra" <su*****@rogers.com> wrote in message news:%2******************@TK2MSFTNGP09.phx.gbl...
at runtime i got error right away. so i am getting closer...just 1 errors in bolds. when i do step over i found same error in bold below
An unhandled exception of type 'System.NullReferenceException' occurred in system.windows.forms.dll
Additional information: Object reference not set to an instance of an object.


Public Class mainPirateChat
Inherits System.Windows.Forms.Form
' Private netBots As New PirateChat.ClientFactory
Private Netsock As New PirateChat.SockFactory
Private WithEvents netBots As New PirateChat.ClientFactory
' Private WithEvents Netsock As New PirateChat.SockFactory
Private clsReader As New PirateChat.clsReadWriteXML

#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
netBots = Nothing
Netsock = Nothing
clsReader = Nothing
Dim frmPref As New PirateChat.frmPreferences
frmPref.MdiParent = Me
Dim szReConnect As Collection = clsReader.GetConfigInfo("Misc", "ReConnect", " ", "PirateChat.xml")
Dim getReConnect As String
For Each getReConnect In szReConnect
bReconnect = CBool(getReConnect)
frmPref.chkReConn.Checked = bReconnect
Next
Dim szStartup As Collection = clsReader.GetConfigInfo("Misc", "Startup", " ", "PirateChat.xml")
Dim getStartup As String
For Each getStartup In szStartup
bStartup = getStartup
frmPref.chkStartup.Checked = getStartup
Next
End Sub
regards,
happy new yrs every 1
from supra

Nov 21 '05 #2

P: n/a
clsReader = Nothing <---- this is causing NullReferenceException
....
Dim szReConnect As Collection = clsReader.GetConfigInfo("Misc", "ReConnect", " ", "PirateChat.xml")

Greg

"Supra" <su*****@rogers.com> wrote in message news:%2******************@TK2MSFTNGP09.phx.gbl...
at runtime i got error right away. so i am getting closer...just 1 errors in bolds. when i do step over i found same error in bold below
An unhandled exception of type 'System.NullReferenceException' occurred in system.windows.forms.dll
Additional information: Object reference not set to an instance of an object.


Public Class mainPirateChat
Inherits System.Windows.Forms.Form
' Private netBots As New PirateChat.ClientFactory
Private Netsock As New PirateChat.SockFactory
Private WithEvents netBots As New PirateChat.ClientFactory
' Private WithEvents Netsock As New PirateChat.SockFactory
Private clsReader As New PirateChat.clsReadWriteXML

#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
netBots = Nothing
Netsock = Nothing
clsReader = Nothing
Dim frmPref As New PirateChat.frmPreferences
frmPref.MdiParent = Me
Dim szReConnect As Collection = clsReader.GetConfigInfo("Misc", "ReConnect", " ", "PirateChat.xml")
Dim getReConnect As String
For Each getReConnect In szReConnect
bReconnect = CBool(getReConnect)
frmPref.chkReConn.Checked = bReconnect
Next
Dim szStartup As Collection = clsReader.GetConfigInfo("Misc", "Startup", " ", "PirateChat.xml")
Dim getStartup As String
For Each getStartup In szStartup
bStartup = getStartup
frmPref.chkStartup.Checked = getStartup
Next
End Sub
regards,
happy new yrs every 1
from supra

Nov 21 '05 #3

P: n/a
if i remove all 3 's nothing.... i will get error.....the problem is
coming from module ....
Sub DisplayMessage(ByVal rtb As RichTextBox, ByVal sText As String,
Optional ByVal Colour As String = "")
rtb.SelectionStart = rtb.Text.Length
rtb.doColor(rtb, sText) <==== this may cause error problem
' rtb.SelectedText = sText <=== if i removed removed and rem
above..this will gave no problem
rtb.SelectionStart = rtb.Text.Length
rtb.ScrollToCaret()
sText = Nothing 'String.Empty
End Sub

i am using irc chat similar to mirc. but everything is working when
connection to various server's networks
what happened is. i connected to undernet server (eu.undernet.org). this
gave me biggest error. but if i connected to irc.webmaster.com or
irc.dal.net.this gave me no problem. but why is this coming from
undernet's servers. but take alook what i got from debug window......
this is undernet server:
Brookville.PA.US.StarLink.Org 001 djanjo2 :Welcome to the Internet Relay
Network djanjo2
Brookville.PA.US.StarLink.Org 002 djanjo2 :Your host is
Brookville.PA.US.StarLink.Org, running version u2.9.32StarLink2.1
Brookville.PA.US.StarLink.Org 372 djanjo2 :-
An unhandled exception of type 'System.NullReferenceException' occurred
in system.windows.forms.dll
Additional information: Object reference not set to an instance of an
object.

i did resarch from google and i did double check keyword "NEW". i can do
in vb6, but i am getting visual studio 2005... fully loaded this spring
or summer.
regards,
Greg Burns wrote:
clsReader = Nothing <---- this is causing NullReferenceException
...
Dim szReConnect As Collection = clsReader.GetConfigInfo("Misc",
"ReConnect", " ", "PirateChat.xml")
Greg
"Supra" <su*****@rogers.com <mailto:su*****@rogers.com>> wrote in
message news:%2******************@TK2MSFTNGP09.phx.gbl...
at runtime i got error right away. so i am getting closer...just
1 errors in bolds. when i do step over i found same error in bold
below
An unhandled exception of type 'System.NullReferenceException'
occurred in system.windows.forms.dll
Additional information: Object reference not set to an instance of
an object.
Public Class mainPirateChat
Inherits System.Windows.Forms.Form
' Private netBots As New PirateChat.ClientFactory
Private Netsock As New PirateChat.SockFactory
Private WithEvents netBots As New PirateChat.ClientFactory
' Private WithEvents Netsock As New
PirateChat.SockFactory
Private clsReader As New PirateChat.clsReadWriteXML

#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the
InitializeComponent() call
netBots = Nothing
Netsock = Nothing
clsReader = Nothing
Dim frmPref As New PirateChat.frmPreferences
frmPref.MdiParent = Me
Dim szReConnect As Collection =
clsReader.GetConfigInfo("Misc", "ReConnect", " ", "PirateChat.xml")
Dim getReConnect As String
For Each getReConnect In szReConnect
bReconnect = CBool(getReConnect)
frmPref.chkReConn.Checked = bReconnect
Next
Dim szStartup As Collection =
clsReader.GetConfigInfo("Misc", "Startup", " ", "PirateChat.xml")
Dim getStartup As String
For Each getStartup In szStartup
bStartup = getStartup
frmPref.chkStartup.Checked = getStartup
Next
End Sub
regards,
happy new yrs every 1
from supra


Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.