Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer
This is the forum to discuss the Wrox book Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer by Rod Stephens; ISBN: 9780470596906
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer 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
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 31st, 2013, 10:59 PM
Authorized User
Points: 179, Level: 3
Points: 179, Level: 3 Points: 179, Level: 3 Points: 179, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2013
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default Lesson 8, Ex. 1

Rod,

I sent you this in email:

How are we supposed to know how to do this?

We're supposed to load a file, not just the filename, right?

Even after I looked at the source code from the website, I don't see how we
could know how to do this.

and you replied:

"Yes, load the file. The exercise says to use the RichTextBox's LoadFile and SaveFile methods. Just pass them the names of the selected files. Those methods only work with Rich Text Files but the book will talk about other types of files later.


Rod "

I looked at the source code, but I don't remember you covering this stuff in the book anywhere.. not sure how we are supposed to know how to do this Exercise.

Not sure where you covered something like StreamType:

" // Open the file.
contentRichTextBox.LoadFile(
openFileDialog.FileName,
RichTextBoxStreamType.RichText);

???
  #2 (permalink)  
Old June 1st, 2013, 11:38 AM
Rod Stephens's Avatar
Wrox Author
Points: 3,166, Level: 23
Points: 3,166, Level: 23 Points: 3,166, Level: 23 Points: 3,166, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2006
Location: , , .
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
Default

Quote:
How are we supposed to know how to do this?
It says in the description of the exercise how to do this: Use the RichTextBox control's LoadFile and SaveFile methods.

Those methods are summarized in Table 7-3 on page 82. There's a code snippet that demonstrates LoadFile on the bottom of page 82 and there's another snippet that demonstrates SaveFile in the middle pf page 84.

Quote:
Not sure where you covered something like StreamType:
The Typing Tips sidebar on pages 83 - 84 talks about the stream type parameter. It basically tells the LoadFile method what kind of file it will be loading.
__________________
Rod

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)
  #3 (permalink)  
Old June 1st, 2013, 06:47 PM
Authorized User
Points: 179, Level: 3
Points: 179, Level: 3 Points: 179, Level: 3 Points: 179, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2013
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks.

The exercise says TO do it, but doesn't say HOW.

However, I see it was explained back on pages 82-84, as you noted.

Guess I read through that the first time without much of it sticking.

I'll go back and read it again.
 


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
Try It - Lesson 7 oviera5 BOOK: Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer 3 January 18th, 2013 01:25 PM
Lesson 9 ikocijan BOOK: Java Programming 24-Hour Trainer by Yakov Fain 1 November 27th, 2012 01:11 PM
Lesson 4 Femi Sonuga BOOK: Knight's Microsoft Business Intelligence 24-Hour Trainer 0 November 25th, 2011 10:25 AM
Lesson 4 - Try It brookesmith BOOK: JavaScript 24-Hour Trainer 2 September 15th, 2011 05:40 PM
Lesson 4 Mtheys BOOK: Java Programming 24-Hour Trainer by Yakov Fain 3 September 15th, 2011 05:02 AM



All times are GMT -4. The time now is 02:15 AM.


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