SunQuest
 
           Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old November 16th, 2004, 07:18 AM
stevemw stevemw is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: uk
Posts: 70 stevemw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Question PLEASE HELP! Showing Text File In Text Box

I have a little program that scans a text file (it's actually a log file), searches for a string, and pulls all lines containing the string into a new log file. On the main form is a button that does this. There is then another button to open this log file. The problem is it only shells the path to the file, so therefore opens in notepad. Ideally I would like the first button, which generates the new log file, to handle the opening of the new log file as well and display it in text box on the main form.

Anyone know how I can do this? I'm pretty new to vb so am struggling a bit. I have only ever opened files to text boxes using the common dialog control, which isn't needed in this case.

I can provide the project files if needed.

Many thanks in advance

Reply With Quote
  #2  
Old November 16th, 2004, 09:11 AM
Darius Darius is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 108 Darius User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 16 m 54 sec
Reputation Power: 4
I think that It may be better to use microsoft rich textbox component.

* put the richtextbox1 object on your form
* in the button click method write richtextbox1.LoadFile FILENAME_WITH_PATH

being FILENAME_WITH_PATH your file name with path (not a constant)

Reply With Quote
  #3  
Old November 16th, 2004, 09:27 AM
stevemw stevemw is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: uk
Posts: 70 stevemw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
I'm sure I tried that. I'll give it another go and post back here either way.

Many thanks

Reply With Quote
  #4  
Old November 16th, 2004, 09:33 AM
stevemw stevemw is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: uk
Posts: 70 stevemw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
I obviously did it wrong, not surprising as I'm new.

All working now. Many thanks for that

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > New To Vb Need Help Showing Text File In Text Box


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway