Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: Beginning Microsoft Visual Basic 2008 ISBN: 978-0-470-19134-7
This is the forum to discuss the Wrox book Beginning Microsoft Visual Basic 2008 by Thearon Willis, Bryan Newsome; ISBN: 9780470191347
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Microsoft Visual Basic 2008 ISBN: 978-0-470-19134-7 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 9th, 2009, 12:36 PM
Registered User
 
Join Date: Sep 2009
Location: Portland, OR
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Question Chapter 7 - WPF Text Editor - pg 236

Wrote code on page 236 w/errors: illegal characters in path, etc.

Re-wrote first button code, which seemed to be giving me problems.
Still have illegal characters in path -- any ideas how to make this work?


<Window x:Class="Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Text Editor" Height="460" Width="600">
<Grid>
<ToolBarPanel Height="26" Name="ToolBarPanel1" VerticalAlignment="Top">
<ToolBar Height="26" Name="ToolBar1" Width="575">
<Button Name="tbrClear" ToolTip="Clear">
<Image Source="file:///C:/Program Files/Microsoft
Visual Studio 9.0/Common7/VS2008ImageLibrary/1033/VS2008ImageLibrary/
Actions/32bitcolor bitmaps/16x16/NewDocumentHs.bmp"></Image>
</Button>


Thank you!
Christina
Reply With Quote
  #2 (permalink)  
Old September 9th, 2009, 01:50 PM
Registered User
 
Join Date: Sep 2009
Location: Portland, OR
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Wink answer:

I went back to the absolute path -- copy and pasted ito add the XAML control. Looks slightly differant from the book. No errors so far!

Code:
<Window x:Class="Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Text Editor" Height="460" Width="600">
    <Grid>
        <ToolBarPanel Height="26" Name="ToolBarPanel1" VerticalAlignment="Top">
            <ToolBar Height="26" Name="ToolBar1" Width="575">
                <Button Name="tbrClear" ToolTip="Clear">
                    <Image Source="C:\Program Files\Microsoft Visual Studio 9.0\Common7\VS2008ImageLibrary\1033\VS2008ImageLibrary\Actions\32bitcolor bitmaps\16x16\NewDocumentHS.BMP">
                    </Image>
                </Button>
                <Separator Padding="1" />
                <Button Name="tbrRed" ToolTip="Red">
                    <Image Source="C:\Program Files\Microsoft Visual Studio 9.0\Common7\VS2008ImageLibrary\1033\VS2008ImageLibrary\Actions\32bitcolor bitmaps\16x16\Color_fontHS.bmp">
                    </Image>
                </Button>
                <Button Name="tbrBlue" ToolTip="Blue">
                    <Image Source="C:\Program Files\Microsoft Visual Studio 9.0\Common7\VS2008ImageLibrary\1033\VS2008ImageLibrary\Actions\32bitcolor bitmaps\16x16\Color_LineHS.bmp">
                    </Image>
                </Button>
                <Separator/>
                <Button Name="tbrUpperCase" ToolTip="Upper Case">
                    <Image Source="C:\Program Files\Microsoft Visual Studio 9.0\Common7\VS2008ImageLibrary\1033\VS2008ImageLibrary\Actions\32bitcolor bitmaps\16x16\FillUpHS.BMP">
                        </Image>
                </Button>
                <Button Name="tbrLowerCase" ToolTip=" Lower Case">
                    <Image Source="C:\Program Files\Microsoft Visual Studio 9.0\Common7\VS2008ImageLibrary\1033\VS2008ImageLibrary\Actions\32bitcolor bitmaps\16x16\FillDownHS.BMP">
                    </Image>
                </Button>
                <Separator/>
                <Button Name="tbrHelpAbout" ToolTip="About">
                    <Image Source="C:\Program Files\Microsoft Visual Studio 9.0\Common7\VS2008ImageLibrary\1033\VS2008ImageLibrary\Annotations&amp;Buttons\bmp_format\Help.BMP">
                    </Image>
                </Button>
            </ToolBar>
        </ToolBarPanel>
    </Grid>
</Window>
Reply With Quote
  #3 (permalink)  
Old April 14th, 2010, 10:38 AM
Registered User
 
Join Date: Apr 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default fix for invalid character

I received the 'invalid character' error message after typing in the code exactly like the book. The problem appears to be related to spaces in the filename. A quick fix is to take out the line breaks and put all of the 'Source' tag on one line. This made the error go away for me.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
WPF basics Chapter 6 mhccStudent BOOK: Beginning Microsoft Visual Basic 2008 ISBN: 978-0-470-19134-7 8 May 12th, 2010 07:37 AM
Text editor surendran PHP How-To 0 October 20th, 2006 12:44 AM
PHP Text editor redcell184 BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 9 September 3rd, 2004 09:53 AM
Need a Text Editor surendran Dreamweaver (all versions) 0 August 3rd, 2004 06:52 AM



All times are GMT -4. The time now is 05:11 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.