|
I have an app which defines several custom configuration classes derived from ConfigurationSection and ConfigurationSectionGroup .
In a dll I do this:
string exePath = Application.ExecutablePath;
Configuration config = ConfigurationManager.OpenExeConfiguration(exePath);
It works. Later I do:
foreach (ConfigurationSectionGroup childGroup in config.SectionGroups)
{
...
}
That works until childGroup is one of the ConfigurationSectionGroup s defined in the application. Then I get a TypeLoadException: "Could not load type '[the_section_group]' from assembly '[the_dll]'."
Is there some way I can make it load the custom types from the parent app?
Thanks in advance for any pointers.
Regards,
Phil
|
|
|
|
|
In the App.config file there is a section named configSections
The "type" member is used to specify where the type that implements the configurationSection lives e.g.
<code>
<configSections>
<section name="DataSourceProviders" type="Data_Models.Configuration.DataSourceProviderCustomConfigurationSection, Data Models, Version=1.0.2337.18582, Culture=neutral, PublicKeyToken=null" />
</configSections>
</code>
|
|
|
|
|
Doh!
I knew that, but I'd copied part of the app.config from another project and forgotten to change that bit.
Many thanks for your light in my darkness.
Regards,
Phil
|
|
|
|
|
hi
i want how to declare the images in program in order to get the images as output during run time? send me the codings too.pls help me...
regards
Murthy
|
|
|
|
|
Just embed them as a resource.
Kmurthy wrote: send me the codings too
No
Kmurthy wrote: pls help me...
I just did.
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
can u tel the process? how to display the image in run time...
somewat urgent.. pls help me
asdfd fghdfg
|
|
|
|
|
How do you want to display the image?
Can you give more details of what you require?
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
i m using VC# using smartphone 2003.one image is dispalyed as a back ground image and another image(Stretchimage) is displayed as a superimposed on the background Image. the stretch image should be displayed in run time only.
direct path of the image should not be given. we declare in one variable(in that variable we have to give the path) and we call that variable whereever we want.
|
|
|
|
|
So basically:
[object].BackgroundImage = Image.FromFile(yourfilenamehere);
Is that what you want, or do you want it embedded in the executable? (It doesn't sound as if you want this done)
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
hi
i already tried that one but... it is not working. can u send ur gmail id.
just i chat n clear my all doubts.. pls
asdfd fghdfg
|
|
|
|
|
Kmurthy wrote: it is not working
What's the error message or compiler error displayed?
Kmurthy wrote: can u send ur gmail id
I can, but then if we find a solution other people can't benefit your problem (which is one of the ideas behind these forums).
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
tat is ur wish. one image is dispalyed as a back ground image and another image(Stretchimage) is displayed as a superimposed on the background Image. how to display this one.
|
|
|
|
|
Kmurthy wrote: superimposed
What do you mean by this, is part of the image transparent?
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
no,two different images.first one is the background image.another one is superimposed on the background image.no transparent images.
|
|
|
|
|
Easiest way would be to add a PictureBox control at runtime and load the picture from the file, e.g.
void LoadPicture()
{
PictureBox picBox = new PictureBox();
picBox.Dock = DockStyle.Fill;
picBox.Image = Image.FromFile(filename);
this.Controls.Add(picBox);
}
-- modified at 6:48 Tuesday 1st August, 2006
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
when im using the from file it displays the error like this. 'System.Drawing.Image' does not contain a definition for 'FromFile'
|
|
|
|
|
Try:
.BackgroundImage = new Bitmap(filename);
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
stil it gives the same error. and there is no property called "BackgroundImage".
|
|
|
|
|
Sorry it's the Image property on the PictureBox control.
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
after using image property also,it gives the same error.
In FromFile we have to give the filename or the path of the image.
asdfd fghdfg
|
|
|
|
|
Kmurthy wrote: In FromFile we have to give the filename or the path of the image.
They're the same thing aren't they, you can use a relative path or an absolute one as long as the image is somewhere on the filesystem.
Check the documentation for the Image object and see which methods are supported by the CF (I don't use the compact framework so I'm guessing (intuitively) here).
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
i m trying the to execute the code the following error occuring.
"Not all code path returns a value"
public DataSet RSopen(string sQuery, OleDbConnection ConnObj, string szUseTransactionObj)
{
try
{
m_ConnObj=ConnObj;
//szUseTransactionObj="";
m_Adapter.SelectCommand = new OleDbCommand(sQuery, m_ConnObj);
if ((szUseTransactionObj == "YES"))
{
m_Adapter.SelectCommand.Transaction = m_DataConrol.GetTransactionObj();;
}
//szUseTransactionObj="";
m_Adapter.Fill(m_Dataset);
m_CurrentRow = 1;
m_Table = m_Dataset.Tables["Chartofacct"];
m_TotalRows = m_Table.Rows.Count;
return m_Dataset;
}
catch (Exception e)
{
e.ToString();
}
}
Shahzad
|
|
|
|
|
try out
public DataSet RSopen(string sQuery, OleDbConnection ConnObj, string szUseTransactionObj)
{
try
{
m_ConnObj=ConnObj;
//szUseTransactionObj="";
m_Adapter.SelectCommand = new OleDbCommand(sQuery, m_ConnObj);
if ((szUseTransactionObj == "YES"))
{
m_Adapter.SelectCommand.Transaction = m_DataConrol.GetTransactionObj();;
}
//szUseTransactionObj="";
m_Adapter.Fill(m_Dataset);
m_CurrentRow = 1;
m_Table = m_Dataset.Tables["Chartofacct"];
m_TotalRows = m_Table.Rows.Count;
return m_Dataset;
}
catch (Exception e)
{
e.ToString();
return new m_Dataset();
}
}
rahul
|
|
|
|
|
The reason you get this compilation error is that you method declares that it will return an instance of DataSet, but not all paths return such an instance. Look at what happens if an exception is raised.
To solve this, you need only to put this line:
Shahzad.Aslam wrote: return m_Dataset;
outside of the try{}catch{} block.
public DataSet RSopen(string sQuery, OleDbConnection ConnObj, string szUseTransactionObj)
{
try
{
m_ConnObj=ConnObj;
m_Adapter.SelectCommand = new OleDbCommand(sQuery, m_ConnObj);
if ((szUseTransactionObj == "YES"))
{
m_Adapter.SelectCommand.Transaction = m_DataConrol.GetTransactionObj();;
}
m_Adapter.Fill(m_Dataset);
m_CurrentRow = 1;
m_Table = m_Dataset.Tables["Chartofacct"];
m_TotalRows = m_Table.Rows.Count;
}
catch (Exception e)
{
e.ToString();
}
return m_Dataset;
}
-- modified at 6:27 Monday 31st July, 2006
|
|
|
|
|
Hi all.
Quick question, I want to use cab file to update my app instead of reinstalling everytime I need to update, so I set the installer to create cab files, no I sit with a zip folder with 300 files in it, how do I actualy use them, also I have no idea what the cab files are, looke like it uses some kind of encryption with the anming of the files.
Can anyone help please or suggest where to look.
Thanx in advance
He who laughs last is a bit on the slow side
|
|
|
|