|
And you are relying on adding a new condition and test everytime you add a new form. Hmm. Plus, how many times do you have 100 forms in an app?
More importantly, as Bekjong states, I wouldn't rely on a loop test in my code. Instead, I'd use a generic dictionary to manage this. Then your code becomes a lot simpler and a lot faster.
|
|
|
|
|
(f.text == "RibbonForm1")
what is it? could tell me that?
and do i have to set the parent to mdicontainer?
if i do that the background colors turn to gray. any way to change to the default color?
|
|
|
|
|
This is just a simple way of telling who the child form is. I wouldn't rely on this, as it was only a quick sample, and the text is the thing that appears in the titlebar.
You would create this form from the parent using.
MyForm form = new MyForm();
form.Parent = this;
form.Show();
|
|
|
|
|
its nice but i prefer to use
if(f.Name == "RibbonForm1")
and not
if(f.Text == "RibbonForm1")
because he can change the name dynamically
respect.
spaps
|
|
|
|
|
You can do this using FormCollection class. Its object will have the list of all the forms opened by your application.
FormCollection o = Application.OpenForms;
I guess this might help.
Chaos, panic and disorder - my work here is done.
|
|
|
|
|
I am trying to write code to uninstall application,for that I need to access "Run" (Start -> Run).How can I do this??
Pls help.
Chaos, panic and disorder - my work here is done.
|
|
|
|
|
Hey Hey Hey!!!
For that you have to create a batch file using in that msiexec.exe with your product code.
Regards
Pankaj Joshi
|
|
|
|
|
bt will it work if the application has exe file for uninstallation?????
Chaos, panic and disorder - my work here is done.
|
|
|
|
|
Sorry for that, I am talking about a desktop application like product, not a single exe.
Regards
Pankaj Joshi
|
|
|
|
|
[DllImport("eigenvv.dll", CallingConvention = CallingConvention.StdCall)]
static extern void EIGEN(double[] a, int m, double[] eigenval, double[]eigenvector);
error:无法加载 DLL“eigenvv.dll”: 找不到指定的模块。 (异常来自 HRESULT:0x8007007E)。
|
|
|
|
|
I'm sorry, but could you convert the error message into English? I won't be able to help until you do.
|
|
|
|
|
|
Thanks
the problem has resolved
|
|
|
|
|
I have a requirement to send a 1000 mails per minute.
How can i move for this?
How multi threading concept is used for this?
Can any one send code for this to send bulk mails in short span of time.
or
u can send links of websites related to this topic.
Thank u
G. Satish
|
|
|
|
|
no threading concept will help you, the bottleneck is your network connection.
It doesn't matter if you send ten mail at a time or one after one.
____________________________________
There is no proof for this sentence.
|
|
|
|
|
Hi,
I am using a PropertyGrid control in my project, and i am populating the values in a Arralist, i couldn't find any methods to bind that arralist to the PropertyGrid.
Is anyone could suggest a way to do that.
Thanks in adavace for the suggessions or help.
code snipets
ArrayList myPropertyList = new ArrayList();
while (reader.Read())
{
string strNodeValue = "";
switch (reader.NodeType)
{
case XmlNodeType.Text:
strNodeValue = reader.Value.ToString();
myPropertyList.Add(strNodeValue); break;
}
}
So here i have the Arraylist with values, and i want to populate those vaues to PropertyGrid
Regards,
- Sree
|
|
|
|
|
I am creating a project.
In that I am having a section "Names" which is a customized section.
Now based on the data in the database I want to create a key and value pairs in that section.
I searched net but they have given the code to write the key value pair in the appsettings but not in the custom section
Can any one tell me how to perform it through code?
Many thanks in advance.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
[^ Maybe this will help]
fafafa, ringakta icke sådant som bringa ack så naggande högönsklig välmåga å baronens ära.
|
|
|
|
|
You need two pieces ...
First, in configSections, tell it there's a new custom section ...
<configsections>
Then add the section ...
<productcode>
<add key="CV" value="AIG Commercial Vehicle">
<add key="CY" value="Axa Private Car">
<add key="MC" value="AIG Motorcycle (MCD)">
|
|
|
|
|
You need two pieces ...
First, in configSections, tell it there's a new custom section ...
<configSections>
<section name="productCode" type="System.Configuration.NameValueFileSectionHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>
Then add the section ...
<productCode>
<add key="CV" value="AIG Commercial Vehicle" />
<add key="CY" value="Axa Private Car" />
<add key="MC" value="AIG Motorcycle (MCD)" />
</productCode>
|
|
|
|
|
Hi,
How can I define, whether two button's bacgroundimages are the same?
I tried (if(button1.backgroundimage==button2.backgrounimage)) but It didn't give right result depite two backgroundimages are the same.
|
|
|
|
|
Try this
Button1.BackgroundImage.Equals(button2.BackgroundImage)
Regards
Pankaj Joshi
|
|
|
|
|
Thanks so much for your suggestion,
|
|
|
|
|
So this is working na?
Regards
Pankaj Joshi
|
|
|
|
|
if (button1.BackgroundImage.Equals(button2.BackgroundImage))
{
MessageBox.Show("sssss");
}
isn't working although both of backgrounimages are the same.
|
|
|
|