Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 9th, 2009, 12:36 PM
Registered User
 
Join Date: Sep 2009
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
 
Old September 9th, 2009, 01:50 PM
Registered User
 
Join Date: Sep 2009
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>
 
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.





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





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