|
-
Jun 28th, 2004, 11:21 AM
#1
Thread Starter
Junior Member
opening and reading from a txt file help
bearing in mind i am a comple novice when it comes to programming (something i do apologise for as its bound to become extrmely annoying very quickly)
how can i direct a push button to open and read a text file,
and subsequently send each line of it to another program with a one second interval between each line send.
i know of the microsfot.visuabasic.appactivate commands but i'm not sure how this would work with the above?
and is it possible to get the program to pause and open a resume dialog box upon after sending a particular word. i.e it's sending the data recognises the word in question, send its and then brings up a resume button, you click the button and it carries on sending the infomation?
as always you can get me on: -
MSN: [email protected]
AIM: Bobbafet41
ICQ: 289141003
-
Jun 28th, 2004, 12:01 PM
#2
Addicted Member
Reading a Text file
I will address how to read a Text file. 
VB Code:
Dim sr As System.IO.StreamReader = System.IO.File.OpenText(Application.StartupPath + "\text.txt")
Dim strFile As String = sr.ReadToEnd
sr.Close()
MsgBox(strFile)
Cheers,
McoreD
Last edited by ~*McoreD*~; Jun 28th, 2004 at 07:00 PM.
-
Jun 28th, 2004, 01:07 PM
#3
Frenzied Member
If you are trying to send data between applications, I would look into .NET Remoting. But to be honest, if reading from a text file is giving you a hard time, Remoting is probably going to be way over your head.
Sean
Some days when I think about the next 30 years or so of my life I am going to spend writing code, I happily contemplate stepping off a curb in front of a fast moving bus.
-
Jun 28th, 2004, 03:19 PM
#4
Hyperactive Member
and for the "every one secound part" put a timer control on the form and set the interval to 1000.
but Sean is right reading/writing files is one of the easyer things to do in programing, and although i have no experience in sending data between apps i imagin it is fairly complicated.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|