Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
|
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 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 January 20th, 2006, 06:48 PM
Friend of Wrox
 
Join Date: Jun 2005
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.
 
Old January 20th, 2006, 09:04 PM
Registered User
 
Join Date: Jan 2006
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¿ÉÖ´ÐÐÎļþ µÃ„·¾¶¾Í¿ÉÒÔÁË¡£

 
Old January 26th, 2006, 02:03 PM
Friend of Wrox
 
Join Date: Jun 2005
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
 
Old January 26th, 2006, 02:08 PM
Friend of Wrox
 
Join Date: Jun 2003
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
 
Old March 23rd, 2006, 10:42 AM
Friend of Wrox
 
Join Date: Jun 2005
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-
 
Old March 23rd, 2006, 03:16 PM
Friend of Wrox
 
Join Date: Jun 2003
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
 
Old June 26th, 2006, 06:23 AM
Friend of Wrox
 
Join Date: Jun 2005
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??
 
Old June 26th, 2006, 12:08 PM
Friend of Wrox
 
Join Date: May 2006
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
 
Old June 30th, 2006, 08:56 AM
Friend of Wrox
 
Join Date: Jun 2005
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??
 
Old June 30th, 2006, 11:01 AM
Friend of Wrox
 
Join Date: May 2006
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





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





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