Hello Is it possible to get the application name the usercontrol is placed into. I'am building a usercontrol that have the possibillity to save properties, the xml file is stored in the "Application Data\Company Name" and the next folder should be the name of the application the usercontrol i used by, then the foldername of the form name the usercontrol is placed into. Eks. Application Data\MyCompanyName\Form1\MyUserControl.xml The Form1 name is taken from the ParentForm property from the usercontrol. Kind regards. Johnny E. Jensen
Try the following: System.Reflection.Assembly.GetEntryAssembly().GetName().Name Not sure if this is what you need. "Johnny E. Jensen" wrote: > Hello > > Is it possible to get the application name the usercontrol is placed into. > I'am building a usercontrol that have the possibillity to save properties, > the xml file is stored in the "Application Data\Company Name" and the next > folder should be the name of the application the usercontrol i used by, then > the foldername of the form name the usercontrol is placed into. > > Eks. > Application Data\MyCompanyName\Form1\MyUserControl.xml > > The Form1 name is taken from the ParentForm property from the usercontrol. > > Kind regards. > Johnny E. Jensen > > >