I'm back again, I just cant figure out the solution here. Can someone lend me a hand with this? I'm having a problem about "Setting of Object reference to an instance of an object".
PS: I read some links here that is connected to this problem but still no luck. Here is the link "What is a NullReferenceException, and how do I fix it?"
It said, we must check and fill the variable to anything just make sure the variable has a value. But in my case, my variable has a value, why is it returning "NullReference" error ?
Thanks Guys.
BELOW IS MY CODE. (Not the entire module just only the procedure)
Private m_imp As Object ' We delegate the details of horz or vert to this class
Public Sub addWidget1(ByRef widget As Object, ByRef minExtent As Object)
m_widget1 = widget
'UPGRADE_WARNING: Couldn't resolve default property of object widget.ZOrder. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
widget.ZOrder()
'UPGRADE_WARNING: Couldn't resolve default property of object m_imp.minExtent1. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
'UPGRADE_WARNING: Couldn't resolve default property of object minExtent. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
m_imp.minExtent1 = minExtent ' <---- HERE IS THE ERROR
End Sub
ERROR: System.NullReferenceException occurred
PS: CODE CALLING THE FUNCTION'S ERROR.
Private Sub initGUI(ByRef splitter As clsSplitLayout, ByRef navpane As clsPaneNav, ByRef contentpane As clsPaneContent, ByRef detailpane As clsPaneDetail)
Dim hsplit As New clsSplitLayout
With hsplit
.SplitType = clsSplitLayout.SplitterType.HORIZONTAL_SPLIT
.createSplitBar("bar1", Me)
.addWidget1(contentpane, 2000) '<--- HERE'S HOW I CALL THE FUNCTION THAT HAS ERROR.
.addWidget2(detailpane, 2000)
End With