Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find Window

Status
Not open for further replies.

AppSpecialist

Programmer
Jul 6, 2001
64
CA
I know this has probably been hashed out quite a bit, but I have a question.

In the form load procedure I am using findwindow to see if th form is already loaded. It finds a match and thinks the form is already loaded... but there is no other version running. I am thinking it is finding itself???

Anyone know of a better way to do what I am looking for or to get findwindow not to look at itself. In this instance... App.previnstance will not do the job for me.

Thanks so much...
 
Before you try to load the form iterate through the Forms collection, which contains all the currently loaded forms

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Also... what I am doing is trying to determine if the form is already loaded from another instance of the VB executable... not certain if forms collection would do that?
 
No, the forms collection will only do it from the current project.
 
There it is. thread222-1137029 Darned hard to find threads sometimes! I wonder if this will help.

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top