Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Read text file

Posted on 1999-01-19
5
Medium Priority
?
164 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 200 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

715 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