View Single Post
  #1 (permalink)  
Old August 8th, 2006, 03:21 AM
mjoc69 mjoc69 is offline
Registered User
 
Join Date: Aug 2006
Location: manchester, , United Kingdom.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 12 - Rendering Through Windows

Hi,

I'm having a problem with the vb.net sample code for the Rendering Windows application. When I click the "Get Parameters" button the application errors at line;

textBox.Text = parameter.DefaultValues(0)

See page 512 of book.

I hope some one can help

The exception detail is;

"System.NullReferenceException was unhandled
Message="Object reference not set to an instance of an object."
Source="WindowsApplication2"
StackTrace:
     at WindowsApplication2.Rendering.frmMain.btnParameter s_Click(Object sender, EventArgs e) in C:\Documents and Settings\michaeloconnor\My Documents\Visual Studio 2005\Projects\WindowsApplication2\WindowsApplicati on2\frmMain.vb:line 282
     at System.Windows.Forms.Control.OnClick(EventArgs e)
     at System.Windows.Forms.Button.OnClick(EventArgs e)
     at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
     at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
     at System.Windows.Forms.Control.WndProc(Message& m)
     at System.Windows.Forms.ButtonBase.WndProc(Message& m)
     at System.Windows.Forms.Button.WndProc(Message& m)
     at System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
     at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
     at System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
     at System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW(MSG& msg)
     at System.Windows.Forms.Application.ComponentManager. System.Windows.Forms.UnsafeNativeMethods.IMsoCompo nentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
     at System.Windows.Forms.Application.ThreadContext.Run MessageLoopInner(Int32 reason, ApplicationContext context)
     at System.Windows.Forms.Application.ThreadContext.Run MessageLoop(Int32 reason, ApplicationContext context)
     at System.Windows.Forms.Application.Run(ApplicationCo ntext context)
     at Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.OnRun()
     at Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.DoApplicationModel()
     at Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.Run(String[] commandLine)
     at WindowsApplication2.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
     at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
     at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
     at Microsoft.VisualStudio.HostingProcess.HostProc.Run UsersAssembly()
     at System.Threading.ThreadHelper.ThreadStart_Context( Object state)
     at System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state)
     at System.Threading.ThreadHelper.ThreadStart()
"

Mike