Solved

Read text file

Posted on 1999-01-19
5
160 Views
Last Modified: 2010-05-03
I am reading a text file.  The way it works is I call a DLL then I have a timer control, read the text file that the DLL produces.  When the timer reads the file, it puts it in a text box on my form.  When the DLL is done processing it's data, it says in the file "Processing complete", but my timer control keeps reading the file.  I need to disable it, the way I want to do it is put some more code into the timer control telling the control to disable it's self when it comes accross this text "Processing complete" , but I don't have a lot of experience working with text file and characters.  So could someone please put some sample code up for me.  Thanks
0
Comment
Question by:strongd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 4

Expert Comment

by:chabaud
ID: 1469407
To disable the timer:

timer1.Enabled = False
0
 
LVL 9

Accepted Solution

by:
Dalin earned 50 total points
ID: 1469408
Assume you have the text displayed in the textbox named txtFromFile:

Add the code to your read-the-file process

If Instr(txtFromFile, "Processing complete")> 0 then timer1.Enabled = False      
0
 
LVL 3

Expert Comment

by:jjbyers
ID: 1469409
A better way might be to fire an event in your DLL and have your project use the withevents keyword.
0
 

Author Comment

by:strongd
ID: 1469410
Thanks a lot.  I worked great!!!!  I'll be back soon with more questions.......
0
 

Author Comment

by:strongd
ID: 1469411
It worked great!!!
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month6 days, 1 hour left to enroll

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question