getting the name of the application that contains my control
I created a control for saving the size and position of a form in the registry.
You drop the control on the form and it does the rest - when the user resizes
the form the control makes a new entry in the registry so and when the application
starts again the control gets that info from the registry and resizes the
form to the size it had when the appliction was last running. There is just
one problem with it. I used the form name for the name of the registery key
to store this information. This works great in most situations but if I use
the control in two different applications which have forms that have the
same name then I run into a problem. For example if project1 has a form called
form1 and project2 has a form called form1
my control saves the form height in HKEY_CURRENT_USER\software\VB and VBA
program settings\formsaver\formsaver\form1\form1.height for both projects.
What I need is a way for the control to get the name of the application that
contains the form in which it is contained. If I use app.exename I get the
name of my control - not the name of the application which is using my control.
I can get the name of the form that contains my form with usercontrol.parent.name
but my question is how can my user control get the name of the application
which is using it. Thanks for your patientence reading this and thanks to
Steve (firstname.lastname@example.org) who did a great job of explaining how to make
my control aware of the container form's events.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL