Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 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 January 20th, 2006, 06:48 PM
Friend of Wrox
Points: 1,075, Level: 12
Points: 1,075, Level: 12 Points: 1,075, Level: 12 Points: 1,075, Level: 12
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2005
Location: , , United Kingdom.
Posts: 244
Thanks: 3
Thanked 4 Times in 4 Posts
Default What to use for a home made notepad

Howdy People,
           I'm trying to make a notepad and am wondering what to use as a text field which can be made into many other file types.
             Thank You,
                       Callum
__________________
Apocolypse2005, I'm a programmer - of sorts.
Reply With Quote
  #2 (permalink)  
Old January 20th, 2006, 09:04 PM
Registered User
 
Join Date: Jan 2006
Location: , , China.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to ChinaWolf
Default

I think you should do like this:
HKEY_CLASSES_ROOT---docfile---shell--open--command--default
change the value for default as : (your execute filename)
modify regedit!!!
ͨ¹ýдע²á±íµÄ·½·¨À´¹ØÁªÎ ļþÀàÐ͵½ÄãµÄEXE¿ÉÖ´ÐÐÎļþ Ä·¾¶¾Í¿ÉÒÔÁË¡£

Reply With Quote
  #3 (permalink)  
Old January 26th, 2006, 02:03 PM
Friend of Wrox
Points: 1,075, Level: 12
Points: 1,075, Level: 12 Points: 1,075, Level: 12 Points: 1,075, Level: 12
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2005
Location: , , United Kingdom.
Posts: 244
Thanks: 3
Thanked 4 Times in 4 Posts
Default

Not really what i am looking for, i mean the actual control. where you can write in and save s a txt file
Reply With Quote
  #4 (permalink)  
Old January 26th, 2006, 02:08 PM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there.. did you saw the rich text control??

HTH

Gonzalo
Reply With Quote
  #5 (permalink)  
Old March 23rd, 2006, 10:42 AM
Friend of Wrox
Points: 1,075, Level: 12
Points: 1,075, Level: 12 Points: 1,075, Level: 12 Points: 1,075, Level: 12
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2005
Location: , , United Kingdom.
Posts: 244
Thanks: 3
Thanked 4 Times in 4 Posts
Default

Hi,
   Funnily enough you can't miss the richtext box control, but when u write html on it then save and it saves with more coding!!!!

-from your lord and master Callum the Incredible-
Reply With Quote
  #6 (permalink)  
Old March 23rd, 2006, 03:16 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Alameda, ca, USA.
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

why just don't use a simple TextBox with the Multiline and Scrollbars properties set to true?

Marco
Reply With Quote
  #7 (permalink)  
Old June 26th, 2006, 06:23 AM
Friend of Wrox
Points: 1,075, Level: 12
Points: 1,075, Level: 12 Points: 1,075, Level: 12 Points: 1,075, Level: 12
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2005
Location: , , United Kingdom.
Posts: 244
Thanks: 3
Thanked 4 Times in 4 Posts
Default

Thanks Marco,
             Would that work for inputing code into and manipulating the data inside of the textbox. also is noptp-ad amde like that??
Reply With Quote
  #8 (permalink)  
Old June 26th, 2006, 12:08 PM
Friend of Wrox
 
Join Date: May 2006
Location: San Diego, CA, USA.
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am not sure I understand your need.
If you just want a simple version of notepad with all the limitations of notepad, the standard text-box control will work fine.
If you want to be able to have various text formating in your display, such as different fonts and different sizes being displayed at the same time, you will want to use something like the Rich Textbox Control.

The "more coding" that you speak of is the RTF markup. This is very important for storing the information needed to describe the formatting. If you don't want this, just use the Text property of the control to retrieve the text minus the formatting and save this through code rather than using the SaveFile method of the rtf control.

So, what are your options if you want to develop a high-functionality text entry screen:
- Write your own control in C++ which is probably NOT a reasonable path for you.
- You could buy a 3rd party control, like the Tx Text Control (http://www.textcontrol.com/), for example. This would be the "VB" way of doing this, and to put a finer point on it - this is really the way VB was intended to be used: To provide the environment and "glue" for putting together complex and full-featured products by re-using commercially available components.

Anyway - If you want features like deep undo functionality, a high degree of formatting, the ability to save to PDF, HTML, RTF, etc then a third party control will be a good anwser. If you jut need minimal editing funtionality, you can do a lot with just the Text Box or an RTF control.

Have fun



Woody Z http://www.learntoprogramnow.com
Reply With Quote
  #9 (permalink)  
Old June 30th, 2006, 08:56 AM
Friend of Wrox
Points: 1,075, Level: 12
Points: 1,075, Level: 12 Points: 1,075, Level: 12 Points: 1,075, Level: 12
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2005
Location: , , United Kingdom.
Posts: 244
Thanks: 3
Thanked 4 Times in 4 Posts
Default

Thanks,
      When i tried to save a html page it came out with extra bits of code which i havent seen before, does some property of the rich textbox control need to be changed??
Reply With Quote
  #10 (permalink)  
Old June 30th, 2006, 11:01 AM
Friend of Wrox
 
Join Date: May 2006
Location: San Diego, CA, USA.
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No - there isn't a property to change. Using the "SaveFile" method of the RichTextBox control saves the formated RTF (which stands for Rich Text Format) text of the control. If you want to save JUST the text portion of it - that is, the text that appears in the control WITHOUT any of the formatting mark-up, then you need to use the Text property of the control to retrieve the text from it, and then save it using the FileSystemObject or one of the older file manipulation methods of VB.

Make sense? You cannot use the SaveFile method if what you want to do is save only the text without the RTF markup.

Woody Z http://www.learntoprogramnow.com
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
NetBeans? Eclipse? Notepad? elAmericano BOOK: Beginning Java 2, JDK 5 Edition 5 October 25th, 2010 11:52 AM
Encryption Notepad, need some help! Groogy Visual C++ 2005 0 March 23rd, 2007 12:31 PM
Notepad or VS,Net Oh_Help VS.NET 2002/2003 2 February 11th, 2004 01:59 AM
Reference in notepad???? quetzalcoatl ADO.NET 2 October 31st, 2003 06:54 PM
Newline in notepad, HOW.....???? veskoula XSLT 3 October 29th, 2003 10:49 AM



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


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