f



How can you get a form to display text from an external text document?

How can you get all the text from a text document (like notepad) and
put it into a label?  Also is it possible to change the text in the
text document?
Thank you.

0
jas4 (43)
12/13/2004 8:54:19 AM
comp.lang.basic.visual.misc 10153 articles. 0 followers. Post Follow

3 Replies
707 Views

Similar Articles

[PageSpeed] 39

Hi James,

You need to read the text file line by line, concatenate the lines together
and then assign it to the caption of the label. Check out the Line Input #
statement in Help.

HTH
Martin

"James" <jas4@thanet.ac.uk> wrote in message
news:1102928059.579651.251840@c13g2000cwb.googlegroups.com...
> How can you get all the text from a text document (like notepad) and
> put it into a label?  Also is it possible to change the text in the
> text document?
> Thank you.
>


0
12/13/2004 3:17:29 PM
For something simple like notepad, use SendMessage with the WM_GETTEXTLENGHT 
and WM_GETTEXT messages. This presumes you already have the hwnd of the edit 
portion of the Notepad app.  The converse of this is WM_SETTEXT.

-- 


Randy Birch
MS MVP Visual Basic
http://vbnet.mvps.org/


"James" <jas4@thanet.ac.uk> wrote in message
news:1102928059.579651.251840@c13g2000cwb.googlegroups.com...
: How can you get all the text from a text document (like notepad) and
: put it into a label?  Also is it possible to change the text in the
: text document?
: Thank you.
:

0
12/14/2004 5:30:31 AM
Perhaps....
Function GetTextFromFile(strInputFileName) As String
Dim FFIn As Integer
FFIn = FreeFile
Open strInputFileName For Input As #FFIn
GetTextFromFile = Input$(LOF(FFIn), #FFIn)
Close #FFIn
End Function
Probably want some error handling in case the file doesn't exist ;-)
HTH, Neila

0
neilanessa (415)
12/17/2004 12:11:17 AM
Reply:

Similar Artilces:

text-text
Wondering how what I input to my UTF-8 terminal gets passed along through my patched [1] trn ... Cyrillic: А Б В Г Д Е Ж З И Й К Л М Н О П а б в г д е ж з и й к л м н о п IPA: ᴀ ᴁ ᴂ ᴃ ᴄ ᴅ ᴆ ᴇ ᴈ ᴉ ᴊ ᴋ ᴌ ᴍ ᴎ ᴏ ɀ Ɂ ɂ Ƀ Ʉ Ʌ Ɇ ɇ Ɉ ɉ Ɋ ɋ Ɍ ɍ Ɏ ɏ [1] https://groups.google.com/d/msg/comp.sys.raspberry-pi/7Z37Hdrm0DM/6aqD-reXFzAJ ...

text + text
What is "text + text" supposed to do right now? It doesn't seem very useful to me. What about making "text + text" as an equivalent for "text || text"? Most strongly-typed programming languages do this. And MS SQL Server too, I think (CMIIW). -- dave ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org Am Freitag, 8. Oktober 2004 12:57 schrieb David Garamond: > What is "text + text" supposed to do right now? Nothing. > What about making "text + text" as an equivalent for "text > || text"? Most strongly-typed programming languages do this. And MS SQL > Server too, I think (CMIIW). What would this gain except for bloat? It's not like SQL is utterly compatible with any programming language; users will still have to learn all the operators anyway. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match Peter Eisentraut wrote: >>What is "text + text" supposed to do right now? > > Nothing. Then are these bugs? (7.4.5 and 8.0.0beta1 give same results). Frankly, the current behaviour is quite strange to me. ------------------ =...

Displaying text in a text box depending on selection made in list box on same form
Hi I have an unbound text box on a form from which the user can choose a product. When the user chooses a product, I want the text box on the same form to display the description of that product. right now I can get it to display the row number of the product that corresponds to what the user clicked but not the value of the Product Description which is what I want. The fields in the tables are both text. here is the code: Private Sub LstContactProducts_AfterUpdate() txtProductDescription.SetFocus txtProductDescription.Text = LstContactProducts.Column(2,txtProductDescription) End Sub Thanks in advance Colin Colin, why don't you create the combobox, with from a table or query with all the information you need and use cboComboboxname.column(0), cboComboboxname.colum(1) etc etc...to populate the fields you want? HTH Michael "Colin Ward" <cward002@sympatico.ca> wrote in message news:2a660c80.0308010710.26b3257@posting.google.com... > Hi I have an unbound text box on a form from which the user can choose > a product. When the user chooses a product, I want the text box on the > same form to display the description of that product. right now I can > get it to display the row number of the product that corresponds to > what the user clicked but not the value of the Product Description > which is what I want. The fields in the tables are both text. > > here is the code: > > Private Sub LstContactProducts_AfterUpdate() > txtP...

Can't get text to be recognized as text when figure is oriented tall or portrait
Hey folks, If I have a figure and I type: figure(1); orient landscape; print -f1 -dpsc 'myfig.ps'; when I import it into Corel everything comes out fine and the text is text. If I take the same figure and do: figure(1); orient tall; %or orient portrait; print -f1 -dpsc 'myfig.ps'; Corel doesn't understand that the text is text, and just uses curves, which is a real pain. Anyone with any idea as to what's going on? Thanks! I found that this opens fine in illustrator, but I use Corel. There seems to be a difference in the encoding that Corel can't handle in...

What is "Text Display"? Text Display vs. Label
What is the difference between the text display vs label? They would seem to be different "objects" in Cadence?? I am not sure how to think about each of them. They both seem to be capable to have the same layer-purpose pair. I was also curious once I stream out my database to a gds if they both continue to retain a difference or if they both became text in gds. Just wondering, thanks for any insight. On Nov 6, 10:35 pm, vlsidesign <ford...@gmail.com> wrote: > What is the difference between the text display vs label? They would > seem to be different "objects" in Cadence?? A label is just a label, a stand-alone object. A text display is associated with another object, usually a pin. The usual use of a text display is to visually display the value of a pin name. -Jay- ...

Can someone suggest text books for Visual Basic.Net
I am the beginner of all beginners in Visual Basic.Net 2003. I'm looking for two types of books. One specifically directed towards beginners and one that shows examples of code for different types of applications. Especially code that shows you how to do most of the processing on the SQL Server to enhance speed of the application. Any help would be appreciated. Also any web sites that could help a beginner would be useful to know. Thanks in advance, have a great weekend. rds PS Any good books on crystal reports or SQL server would also be useful. Checkout the Microsoft Press books and ones published by Sybex too. I have Visual Basic.Net for Access Databases and it's very informative, you might also see if you can find some of the Wrox Press books, Wrox Press is now defunct, but someone said they were bought out on certain titles. If you have a college around you and a campus bookstore, checkout Course Technology books for students and instructors. http://www.sybex.com http://www.course.com HTH Michael ...

Limiting the amount of text a user can enter in a text box and will be printed in a form where the size cannot be expanded?
What do others do to limit the number of characters a user can enter in a text box? Do you specify the number of characters exactly so that only that number will fit in the text box, thereby preventing the user from overfilling the text entry? Of course, if they do overfill, they can see/view the extra data by using the arrow key to scroll through the text in the field. This has been raised on a project I am doing where these text boxes are ultimately printed on top of preprinted forms. Only so much space for the text box on the form so I cannot use "can expand" properties. thanks Bob On May 23, 5:06 pm, Bob Alston <bobalst...@yahoo.com> wrote: > What do others do to limit the number of characters a user can enter in > a text box? Do you specify the number of characters exactly so that > only that number will fit in the text box, thereby preventing the user > from overfilling the text entry? > > Of course, if they do overfill, they can see/view the extra data by > using the arrow key to scroll through the text in the field. > > This has been raised on a project I am doing where these text boxes are > ultimately printed on top of preprinted forms. Only so much space for > the text box on the form so I cannot use "can expand" properties. > > thanks > > Bob Here's what I still use: http://groups.google.com/group/comp.databases.ms-access/msg/8ba0bbcaf3f5428c James A. Fortune CDMAPoster@...

Created text as raster, can I convert it to vector so I can modify text
I want to be able to edit it, but since it is raster, I can't. Do i just need to re-create the wheel? twice_redeemed@yahoo.com wrote: > I want to be able to edit it, but since it is raster, I > can't. Do i just need to re-create the wheel? When you created the text as raster, you painted it into the image, replacing the pixels that were there. You will need to re-create those pixels, either from a before-text copy of the image or by retouching the image you have. Then write your vector text and leave it on its own vector layer, saving your master copy in PspImage format f...

Created text as raster, can I convert it to vector so I can modify text
I want to be able to edit it, but since it is raster, I can't. Do i just need to re-create the wheel? twice_redeemed@yahoo.com wrote: > I want to be able to edit it, but since it is raster, I > can't. Do i just need to re-create the wheel? When you created the text as raster, you painted it into the image, replacing the pixels that were there. You will need to re-create those pixels, either from a before-text copy of the image or by retouching the image you have. Then write your vector text and leave it on its own vector layer, saving your master copy in PspImage format f...

How to get text in text box to wrap?
The variable {job-name} in this code snippet does NOT wrap, resulting in the text running off the page. How would I get job-name to word wrap? pageWidth 36 mul % x = pageWidth * 1/2 * 72 pageHeight 36 mul % y = pageHeight * 1/2 * 72 pageHeight 2 mul add % y += 1 line 2 copy % Copy X & Y moveto (Title: ) RIGHT moveto ({job-name}) show This postscript file is from the CUPS printing application on a Linux system. Here is the complete file: FILE: /usr/share/cups/banners/standard %!PS-Adobe-3.0 %%BoundingBox: 0 0 612 792 %%Pages: 1 %%LanguageLevel: 1 %%DocumentData: Clean7Bit %%DocumentSuppliedResources: procset bannerprint/1.0 %%DocumentNeededResources: font Helvetica Helvetica-Bold Times-Roman %%Creator: Michael Sweet, Easy Software Products %%CreationDate: May 10, 2000 %%Title: Test Page %%EndComments %%BeginProlog %%BeginResource procset bannerprint 1.1 0 % % PostScript banner page for the Common UNIX Printing System ("CUPS"). % % Copyright 1993-2005 Easy Software Products % % These coded instructions, statements, and computer programs are the % property of Easy Software Products and are protected by Federal % copyright law. Distribution and use rights are outlined in the file % "LICENSE.txt" which should have been included with this file. If this % file is missing or damaged please contact Easy Software Products % at: % % Attn: CUPS Licensing Information % Easy Software Products % 44141 Airport View Drive...

how can i get the pixel from the picture and get word from it in to text box?
please say me how can i get the pixel from any area of screen and make it convert in to tezt or character and make text in the text box?? please say thanks in advance It sounds like you are looking for 'Optical Character Recognition' capability. I have seen high-end document databases that allow you to perform a "Zone OCR" task on some area of an imaged document and drop the extracted text directly into a database field of your choice. This is a data-entry time saving tool. Googling for no cost OCR programs should get some freeware to play with that you may be a...

file command: "XML document text" vs "XML document text"
I've just used the file command on four files of RDF-XML with the following output: augtfidf.rdf: XML document text kyoto.rdf: XML document text stuff.rdf: XML document text tfidf.rdf: XML document text What does it mean that one of them has an extra space between "XML" and "document"? -- The kid's a hot prospect. He's got a good head for merchandising, an agent who can take you downtown and one of the best urine samples I've seen in a long time. [Dead Kennedys t-shirt] On 16.10.2012 16:06, Adam Funk wrote: > I've just used the file command on four files of RDF-XML with the > following output: > > augtfidf.rdf: XML document text > kyoto.rdf: XML document text > stuff.rdf: XML document text > tfidf.rdf: XML document text > > What does it mean that one of them has an extra space between "XML" > and "document"? Hard to tell without further information. What does file *.rdf | od -c show you? Janis Janis Papanagnou wrote: > On 16.10.2012 16:06, Adam Funk wrote: >> I've just used the file command on four files of RDF-XML with the >> following output: >> >> augtfidf.rdf: XML document text >> kyoto.rdf: XML document text >> stuff.rdf: XML document text >> tfidf.rdf: XML document text >> >> What does it mean that one ...

Add some external text to indexed OCR text
Hello, we are scanning some documents as tiff and convert them into PDF documents. By OCR the contained text is indexed. Now we want to add some external text from a .txt file to the indexed text, but it shall not appear visible in the PDF document. I'm grateful for any hints how to achieve this. Regards, Jens "Jens Riedel" <JensRie@gmx.de> wrote in message news:3hso5vFir9ndU1@individual.net... > Hello, > > Now we want to add some external text from a .txt file to the indexed > text, but it shall not appear visible in the PDF document. PDF Meld can add t...

How do I Copy an error message to a text document, as text?
How do I Copy an error message to a text editor document (BBEdit, to be specific) as just plain text (what I see in the notebook cell)? I think I've now tried every possible Copy and Copy As . . . option in the Mac front end menus for Mathematica 4.2, with the text selected and with the cell bracket selected; and every one of them (fourteen cases in all) gives me a messy version of the error message with a bunch of formatting markup stuff inserted. Frustrating!!! Seigman: Yasvir was correct in copying Input and Output Forms to plaintext. However, that is not the M...

How to get selected text from a text edit control?
I created a text edit control using CreateEditTextControl. I can get the current text by calling char buf[256]; Size textSize = 0; GetControlData(controlRef, kControlEditTextPart, kControlEditTextTextTag, 255, buf, &textSize); but how do I get only the text that is currently selected (highlighted)? thanks, Shai In article <1111086224.345185.78280@g14g2000cwa.googlegroups.com>, shai@waves.com wrote: > I created a text edit control using CreateEditTextControl. > I can get the current text by calling > > char buf[256]; > Size textSize = 0; ...

How to get a ordered text combining Text and values
How can I to get a correct label in this case: In[]: k=18; Text["My curve for" k "units"] Out[]: My curve for 18 units Thanks k = 18; Text["My curve for " <> ToString[k] <> " units"] My curve for 18 units Bob Hanlon ---- Miguel <misvrne@gmail.com> wrote: > How can I to get a correct label in this case: > In[]: k=18; > Text["My curve for" k "units"] > > Out[]: My curve for 18 units > > Thanks > Some examples with increasing levels of format control. myLabel[value_] := Row[{"My curve for ", value, " units"}] myLabel[18] myLabel[value_] := Style[Row[{"My curve for ", value, " units"}], 16, "Panel", Background -> None] myLabel[18] myLabel[value_] := Style[Row[{"My curve for ", NumberForm[value, {4, 3}], " units"}], 16, "Panel", Background -> None] myLabel[N[Pi]] -- David Park djmpark@comcast.net http://home.comcast.net/~djmpark/ "Miguel" <misvrne@gmail.com> wrote in message news:g3dcd0$rdv$1@smc.vnet.net... > How can I to get a correct label in this case: > In[]: k=18; > Text["My curve for" k "units"] > > Out[]: My curve for 18 units > > Thanks > On 6/19/08 at 6:28 AM, misvrne@gmail.com (Miguel) wrote: >How can I to get a correct label...

Running winecfg has No text or damaged text displayed
below is a discription of a "fix" for this problem from the wiki wine page but i dont understand how the registry is relevant since i dont have windows on this box. please help 6.18. Running winecfg has No text or damaged text displayed or 6.19. Using wine over remote X11 sessions and No text or damaged text displayed Please make sure not have added any fonts to wine. Font conflicts can sometimes cause a similar issue. If a fresh wine prefix.(A copy of wine that nothing has been done to yet) Is having this problem. Try setting following in registry [HKEY_CURRENT_...

Read and display Japanese text from text file
Hi there, a while ago, I posted a question regarding reading japanese text from a text file. Well, since I solved the problem, I thought I'd post my solution for the benefit of other people with the same problem. The plan was to make a script to read and display japanese text. I will use it for making a japanese proverb script and for a japanese language study script. Method : I wrote a simple kanji text file (saved with UTF-8 encoding) I wrote a simple PHP script to display the file contents (saved with UTF-8 encoding) I specified the content-type header for the HTML page : <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> *** All files have the same encoding. *** UTF-8 supports japanese characters. and it works! this is my PHP (and HTML) script : <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>PHP : Japanese Text File Read : Exercise 1</title> </head> <body> <?php $filename="japanese.txt"; //open file $fp = fopen($filename,'r'); //loop through each line in the file while($line=fgets($fp)) { //output current text file line print $line."<br>"; } //close file handle fclose($fp); ?> </body> </html> I know it's a very simple script, for testing purposes only. It displays the contents of the japanese text file line by line. The key was to save all files i...

How to select all texts of the document of the format of the selected text?
Hi,i have selected a text of the document with the specified font face, color and size in MS Word 2000. Now , I want to select all the relevant texts from the entire document with the same format(face,color and size) as of the selected text. so Is there any method or shortcut to do this op.? Not really. You have to "walk" the document checking the styles as you go along. And You have to watch out for cases where the style changes in the middle of a word (!) and code accordingly to get the desired results. chetan26nov@gmail.com wrote: > Hi,i have selected a text of the document with the specified font face, > color and size in MS Word 2000. Now , I want to select all the relevant > texts from the entire document with the same format(face,color and > size) as of the selected text. > so Is there any method or shortcut to do this op.? ...

pdf \ text (get rid of text in pdf)
Is there a way to remove all text from PDF? Will extract images work for you? If so, PDF-Tools by Tracker Software will do it. http://www.docu-track.com/ -- Don Vancouver, USA "MarosV" <maros.vranec@gmail.com> wrote in message news:ebb897e1-c8e3-4b3a-9274-dfd9d2c845c3@c4g2000hsg.googlegroups.com... > Is there a way to remove all text from PDF? ...

Getting kind of abstract text snippets from text nodes
Hi everybody, I am about implementing a little search engine that searches a phrase over xml text nodes. I got that all working fine but what I want as the results is not the complete text of the textnode, I would like to make an abstract like result list (such output that you get with google searches. For eg .... I am the <b>substring</b> from a complete text node ... where "substring" is the search term. The problem is simple (I think): I want to extract all the text parts of the complete text node, where search searchterm is highlighted, surrounded by the text like 30 characters. I found an intersting post "cut down text" which is almost that what I am looking for, but there the text is just trimmed by x characters. Is anybody here, that has an "elegant" way to solve that or some hints that get me to the solution? I am not able to use regex (would be nice though) My parser is Sablotron so I am restricted to the functions that I get. (1.0). Any help is greatly appreciated. regards, Andreas W Wylach Think about dividing the text into three parts: before your target, the target itself, and after the target. Process each appropriately. If you want to report multiple instances within the same block of text, look at the standard examples of recursive text processing. -- () ASCII Ribbon Campaign | Joe Kesselman /\ Stamp out HTML e-mail! | System architexture and kinetic poetry "Andreas W. Wylach" <aw@ioc...

how to get complete text from Document
I'm trying to implement a JTextField that updates a DefaultMutableTreeNode in a JTree just as the user enters text into the field. In my class which implements DocumentListener, I'm trying to capture the entire String that was typed in from a JTextLabel and not just the inserted text that comes through each type the user hits the key. But this isn't working, anyone have ideas here on what I'm doing wrong? public void insertUpdate( DocumentEvent de ) { Document doc = de.getDocument(); int offset = de.getOffset(); int length = de.getLength(); try { // I want allText to be the complete string allText = doc.getText(0, length); } catch (BadLocationException ble) { } } > In my class which implements DocumentListener, I'm trying to capture > the entire String that was typed in from a JTextLabel and not just the > inserted text that comes through each type the user hits the key. > > > public void insertUpdate( DocumentEvent de ) { > Document doc = de.getDocument(); > int offset = de.getOffset(); > int length = de.getLength(); > > try { > // I want allText to be the complete string > > allText = doc.getText(0, length); > } catch (BadLocationException ble) { } > } > But this isn't working, anyone have ideas here on what I'm doing wrong? it is clear - you need length of Document, but you are getting length of inserted text -- Andrey Kuznetsov http://uio.imager...

Can I get plain text?
I just switched to Eudora 6.1 from my beloved Eudora 3.0 and have quickly gotten fed up reading people's really big fonts, really small fonts, medium-sized but grotesquely ornate fonts, orange text, green text, and similar annoyances. I've searched through Eudora's options and can't find anything corresponding to "strip out all this blasted formatting and let me read plain text." Is it possible to do such a thing in Eudora 6.1? Barring this, can anyone recommend a good mail reader for Windoze that will let me view plain text? I can't go back to Eudora 3 because of SSL issues. Thanks for any help. -- Bet you didn't know today was such a long time coming chawtrey@hotpop.com (Charles Hawtrey) wrote in news:40a58f9c.24558343 @news.individual.net: > I just switched to Eudora 6.1 from my beloved Eudora 3.0 and have > quickly gotten fed up reading people's really big fonts, really small > fonts, medium-sized but grotesquely ornate fonts, orange text, green > text, and similar annoyances. I've searched through Eudora's options > and can't find anything corresponding to "strip out all this blasted > formatting and let me read plain text." Is it possible to do such a > thing in Eudora 6.1? > > Barring this, can anyone recommend a good mail reader for Windoze that > will let me view plain text? I can't go back to Eudora 3 because of > SSL issu...

How can I change displayed text?
Folks, Say I have a table, ten columns, ten rows - Each with a word in it. I want to change the values of some/all of the cells in the table via a hyperlink. How do I reference each cell and change its text contents from a link elsewhere in the page? I have a rought idea that I'll need something like 'id' in my <td> tags but while I have a greater understanding of server-side programming langauges like PHP, javascript is still very new to me. Can someone help? I am learning more and more about document properties so if someone could provide me with a quick example (with ...

Web resources about - How can you get a form to display text from an external text document? - comp.lang.basic.visual.misc

Identity document - Wikipedia, the free encyclopedia
An identity document (also called a piece of identification or ID , or colloquially as one's 'papers') is any document which may be used to verify ...

New CSIRO document reveals scale of planned cuts to climate programs
... science units planned to slash four out of five researchers, all but eliminating its monitoring and climate modelling research, a new document ...

New CSIRO document reveals scale of planned cuts to climate programs
... science units planned to slash four out of five researchers, all but eliminating its monitoring and climate modelling research, a new document ...

Meizu PRO 6 Could Cost $462, According To A Leaked Document
Meizu PRO 6 has been leaking left and right in the last couple of weeks. Meizu’s upcoming flagship was expected to be announced in the third ...

Government documents reveal Dyson is making an electric car
Filed under: Government/Legal , Green , UK , Electric In a now-retracted government document, we learn that Dyson is getting UK government money ...

Chelsea Manning: Insider Threat document shows US government employees are under surveillance
The US government is busy putting thousands of its own employees under 'permanent surveillance' according to a document obtained by Chelsea Manning. ...

Tax planning: Time to rush - Business Standard News New Document Widgets Magazine Widgets Magazine Widgets ...
With March 31 approaching fast, most employees should ideally have given all their tax planning proof to their respective companies. If you have ...

Documents the Hulk Hogan jury didn't get to see
Recently unsealed documents in the Hulk Hogan case may bolster Gawker's appeal of the $115 million verdict.

Document: An alleged sex abuse victim may testify at Hastert sentencing in hush-money case
CHICAGO (AP) — Document: An alleged sex abuse victim may testify at Hastert sentencing in hush-money case .

Senate Committee Demands DHS Produce Whistle-Blower Smear Documents
Senate Committee Demands DHS Produce Whistle-Blower Smear Documents

Resources last updated: 3/24/2016 10:52:42 PM