|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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) ![]() |
|
#3
|
|||
|
|||
|
I'm sure I tried that. I'll give it another go and post back here either way.
Many thanks |
|
#4
|
|||
|
|||
|
I obviously did it wrong, not surprising as I'm new.
All working now. Many thanks for that |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > New To Vb Need Help Showing Text File In Text Box |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|