views:

690

answers:

2

I have this VB.Net 1.1 project that I have to make some changes to. There is a flag in the App.config file. If it is false, the page just loads a splash screen and runs the program normally. If it is true it first opens a login window.

VB.Net is not something I've ever worked with before. I can't for the life of me figure out where the logic for the picking the startup object is. In the property pages, Main.vb is always set as the startup object, but that's not even the window that loads up when the flag is false, it always comes after the splash screen.

I've search all through the code for any reference to creating a new instance of the login window to display it but can't find it. I've searched for where it checks what the flag is set to, but anything I've found for that is not in reference to loading the login window.

Any ideas?

A: 

Can you provide the line of code in the app config that you are referring to?

David Stratton
+1  A: 

What is the name of the login window class? You could either do a search in the entire solution to find all occurences of that name (e.g. by pressing Ctrl+Shift+F) or place the cursor on the class name and press Shift+F12. The latter will find all references of the login window class. In the search result window now look for new MyLoginWindow to see where it is instantiated.

From that location on you can use the same method again to find the callees and possibly the place in the code where the config flag is checked (Or you could place a breakpoint, debug and walk up the call stack to see where you are coming from - that could be easier).

0xA3
Thanks, ctrl+shift+f did it. I was using ctrl+f and it definitely wasn't finding what I was looking for and didn't have a solution wide search. Thought for sure the search functionality would be similar to VS2005 or 2008. It seems like it must not have been searching closed regions either.
Carter
another option could have been to rename the login class and watch the error window... :)
dotjoe
@Joe nice trick ;)
0xA3