| | |
How to open txt file
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
Something to note when using a richtextbox, is the method "loadfile", which will load a .txt file (or an RTF File... Actually, it will load any file, but you might want to stick to .txt and rtf with it). You can do it that way, which is real easy, but not so much fun. Like this
richtextbox1.loadfile "c:\boot.ini", which load the file "boot.ini" from root of the c drive (c:\). If you are dead set on doing it the hard way (which I am) you can use open, which follows this syntax open path for action as handle Most likely only .txt and rtf files. If you want to do processing for other kinds of files, you'll need to manually try to format the data and display it. One trick that I thought was a pretty good plan, was have the program check to see if MS word is installed, and if so, have VB use Word behind the scenes to convert the file to a .txt or a .rtf, and then display it that way (I mean for documents, if you want to do pictures and stuff, you'll have to use picturebox's or apis with device contexts....)
Last edited by Comatose; Aug 10th, 2006 at 5:36 pm.
![]() |
Similar Threads
- Can seem to open my file (C++)
- Txt File (Visual Basic 4 / 5 / 6)
- Search a txt file for words (C++)
- Open any file and List. (Visual Basic 4 / 5 / 6)
- Getting an array from a txt file (C)
- reading txt file into array (C++)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: hide letters of password
- Next Thread: working with calendars
Views: 12682 | Replies: 4
| Thread Tools | Search this Thread |
Tag cloud for Visual Basic 4 / 5 / 6
* 6 429 2007 access activex add age append application basic beginner birth bmp c++ calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver struct subroutine table tags textbox timer urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows






