Wrox Programmer Forums
|
Visual Basic 2005 Basics If you are new to Visual Basic programming with version 2005, this is the place to start your questions. For questions about the book: Beginning Visual Basic 2005 by Thearon Willis and Bryan Newsome, ISBN: 0-7645-7401-9 please, use this forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Basic 2005 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 13th, 2006, 06:31 PM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default Auto Run Program

Hi,

I am hoping someone can help point me in the right direction...

I have an application that opens with a form.

What I would like to do, is to determine is two files exist on the computer, run a procedure if they do, and then shut the application down.

Here is what I have..

frmMain is displayed. txtFile1 and txtFile2 display the filename.
Sub StartComparison is used to compare them, but it doesn't start automatically. StartComparison closes the app, but I have to run it manually on a button click for it to run

The code I am using is..

If My.Computer.FileSystem.FileExists(txtFile1.Text) And My.Computer.FileSystem.FileExists(txtFile1.Text) Then
    Me.StartComparison()
End If

I have tried it in frmMain_GotFocus, Load and Activated.

Any help or suggestions would be appreciated.

Thanks

Mike

Mike
EchoVue.com
__________________
Mike
EchoVue.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
HOW to Run php program dimpleboy PHP How-To 7 January 22nd, 2015 12:40 AM
run a program automatically hastikeyvan ASP.NET 2.0 Professional 1 December 18th, 2009 03:34 PM
Auto run when loading a spreadsheet alantodd Excel VBA 5 June 27th, 2009 02:59 AM
Auto run quit not cleat anukagni Access 4 June 22nd, 2007 01:32 AM
How to run another .exe from my program shivendra C++ Programming 1 July 28th, 2006 04:56 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.