How to deliberately invoke a windows form

I am maintaining some code. Some of the code was written, but never implemented.

 Specifically, In the project their is a windows form named frmDiag.vb. I don't know if this form was ever used (wired up) to the application. How can I tell if the frmDiag.vb code is ever actually used in the application?

Or I suppose another way of phrasing this question is : In my project I have a windows form named frmDiag.vb. So my question is : In what ways can I invoke this form? Meaning making it display on the screen?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Fernando SotoRetiredCommented:
Hi  brgdotnet;

On the main menu click on the Edit --> Find and Replace --> Find in Files. In the new window that opens enter frmDiag in the "Find what:" comboBox. Then select Entire Solution in the "Look in:" comboBox. Then click "Find All" button. This will find all instances of that word in the solution in the Find Result window that will open. Double clicking on  any of the found results will open the file to the location it appears.

To your question "In what ways can I invoke this form?", Place a button on a form that does display a form and in its click event instantiate the form:

Dim diagFrm = New frmDiag()

Open in new window

That will display it.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Éric MoreauSenior .Net ConsultantCommented:
You could comment out the whole form. If it is referenced, your project won't just compile. That's easy and it would answer your question maybe 95% of the time.

The remaining 5% is if the form is used by Reflection. Then the compilation wouldn't failed. Only the runtime.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.