|
-
June 17th, 2012, 04:13 PM
#1
Code Debug Issue
Working with the Head First C# ebook. entered the single line of code in
messageBox.show ( "Contact List 1.0. \nWritten by: Phil Pense", "About") ;
Same line of code was entered in two separate but identical projects. Debug of the first goes to completion and generates the About panel. the second does not generate the About panel. The debug readout is as follows:
'Head First Contacts Project.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_64\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Head First Contacts Project.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Head First Contacts Project.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Head First Contacts Project.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Head First Contacts Project.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Head First Contacts Project.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Head First Contacts Project.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Head First Contacts Project.vshost.exe' (Managed): Loaded 'C:\Users\maurice\Documents\Visual Studio 2008\Projects\Head First Contacts Project\Head First Contacts Project\bin\Debug\Head First Contacts Project.vshost.exe', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Head First Contacts Project.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089\System.Core.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Head First Contacts Project.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Xml.Linq\3.5.0.0__b77a5c561934e089\System.Xml.Linq.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Head First Contacts Project.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Data.DataSetExtensions\3.5.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Head First Contacts Project.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_64\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Head First Contacts Project.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Deployment\2.0.0.0__b03f5f7f11d50a3a\System.Deployment.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'Head First Contacts Project.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The thread 0x9dc has exited with code 0 (0x0).
The thread 0x17d4 has exited with code 0 (0x0).
The thread 0x195c has exited with code 0 (0x0).
'Head First Contacts Project.vshost.exe' (Managed): Loaded 'C:\Users\maurice\Documents\Visual Studio 2008\Projects\Head First Contacts Project\Head First Contacts Project\bin\Debug\Head First Contacts Project.exe', Symbols loaded.
The thread 0x153c has exited with code 0 (0x0).
The thread 0x1910 has exited with code 0 (0x0).
The thread 0x11a4 has exited with code 0 (0x0).
The thread 0x658 has exited with code 0 (0x0).
The program '[1904] Head First Contacts Project.vshost.exe: Managed' has exited with code 0 (0x0).
I write as a novice and can see no apparent error that would prevent the "About" panel to present itself. IDE image is uploaded to:https://skydrive.live.com/redir?resi...F3F75A51A!1393 Guidance sought
-
June 17th, 2012, 06:04 PM
#2
Re: Code Debug Issue
Most likely, the click event for your picture box is not hooked up to the pictureBox1_Click(...) method.
(Provided that there is a picture box on the form.)
This could happen if you entered the code from the book, but didn't follow the steps in detail (or if it wasn't explained in detail).
Normally, you would add a picturebox (or some other control) to your form in the designer, select it, check out it's properties panel, click on the little yellow thunderbolt icon [ ] to show it's events, double click the "Click" event in the list, and the IDE would then automatically generate the appropriate handler method, and hook it up.
But, since you already have a method defined, just find the Click event in the properties panel, and open the dropdown next to it - it show's a list of all the compatible methods available; pictureBox1_Click should be shown, select it and you're done.
You'll learn later on that this can be done in code as well.
Last edited by TheGreatCthulhu; June 17th, 2012 at 06:06 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|