hrabia Posted November 1, 2004 Posted November 1, 2004 I have my own app context, and I'd like to check some properties from within a main form. How can I achieve this? Quote A man and a dog have an average of three legs. Beaware of Statistics.
*Gurus* divil Posted November 1, 2004 *Gurus* Posted November 1, 2004 Presumably if you're creating your application context you must be storing it somewhere, in which case you can pass it to your main form as it is created so it has a reference to it too. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
hrabia Posted November 2, 2004 Author Posted November 2, 2004 Hmm, ApplicationContext takes my main form as constructor parameter: static void Main() { MyContext _MyCtx = new MyContext(new MyForm()); Application.Run(_MyCtx); } where MyContext derives from System.Windows.Forms.ApplicationContext, so I've looked for some kind of standard way (parameter) to get the context within a form (something like that: myForm.Context, like in ASP.Net that has it's HttpContext). Quote A man and a dog have an average of three legs. Beaware of Statistics.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.