lordofduct
Well-known member
- Joined
- Jun 24, 2010
- Messages
- 71
- Programming Experience
- 3-5
I'm using Visual Studio 2008 writing a Windows Forms project and I'd like to know a way to step around 'default instances' of forms.
I don't like default instances, they constantly get in my way, and working in a team it's causing some really annoying confusion about the object identity of which form is actual in focus at this moment. This means I need to go threw the entire project (big) and remove ALL references to any 'default instance' of a form. But this is difficult to do as there's no errors or anything, it basically requires me to search for every text of "MyFormType." and then checking if it's accessing a default instance and fix it like that.
It'd be nice if I could just turn it off or something so I could
1) easily find all erronous lines of code
2) avoid the accidental use of it in the future by anyone on the team
[edit]
found a hack way of accomplishing half of what I want... in the constructor method require any number of parameters (they can even be optional, which is cool), and the project will then cry out about any default instance.
I don't like default instances, they constantly get in my way, and working in a team it's causing some really annoying confusion about the object identity of which form is actual in focus at this moment. This means I need to go threw the entire project (big) and remove ALL references to any 'default instance' of a form. But this is difficult to do as there's no errors or anything, it basically requires me to search for every text of "MyFormType." and then checking if it's accessing a default instance and fix it like that.
It'd be nice if I could just turn it off or something so I could
1) easily find all erronous lines of code
2) avoid the accidental use of it in the future by anyone on the team
[edit]
found a hack way of accomplishing half of what I want... in the constructor method require any number of parameters (they can even be optional, which is cool), and the project will then cry out about any default instance.
Last edited: