|
Please please don't add one day on every update method, So it will create the problem. For that problem you have to add time difference between India and netherland. Suppose time difference is around 3.48 mins. Then Add/subtract this much of minutes from the actual date.
Hope this help.
Regards
Pankaj Joshi
|
|
|
|
|
is there any other than given solution coz i am using bulk copy for update. i.e. can we change in dataset b4 sending on web service?
Yogesh Pekhale
pekhaleyogesh@gmail.com
|
|
|
|
|
This is strange
If you are updating a dataset then the dataset should have the pre-filled values like if you are input a transaction in india on 27/01/2007 then your datatabel is having that value. how it will take server date...?
Regards
Pankaj Joshi
|
|
|
|
|
I have tried using the mdi method, but found out that it wasnt what I wanted. It opens a form within the parent form, which isnt the way I want
What I want to do is to open a form from a parent form.
If I use form.Show(); I can go back to the parent form and open the same form again. That I want not possible.
If I use form.ShowDialog(); I cant go back to the parent form, which is not what I want either.
What I want to do is to be able to go back to the parent form and open other forms, but not open the same form twice.
How do I do that?
|
|
|
|
|
For that you have to create a globally accessible class. In that just put bool variable for each form like :
IsForm1Open=false;
IsForm2Open=false;
IsForm3Open=false;
Before opening any Form from the MDI first check this variable.
And on the each form's load event make that variable true. and in the dispose method make this false.
Regards
Pankaj Joshi
|
|
|
|
|
Why are you doing this? An MDI form contains a list of child forms. Use that to evaluate whether or not the form is present. A simplistic example would be:
bool found = false;
foreach (Form f in this.MdiChildren)
{
if (f.Text == "RibbonForm1")
{
found = true;
f.TopMost = true;
}
}
if (!found)
{
RibbonForm1 frm = new RibbonForm1();
frm.MdiParent = this;
frm.Show();
}
|
|
|
|
|
Good solution
But this is OK when I am having more than 100 forms in my application. this will loop for each time 100 times..?
Performance issue...
Regards
Pankaj Joshi
|
|
|
|
|
I'd just create a central form pool somewhere and use id's to fetch the form I want. Example:
<font><font> public class FormpoolClass
{
private Dictionary< string, Form > formPool = new Dictionary< string, form=>();
public class CustomForm : Form
{
}
public formType GetForm<formType>(string form_id) where formType : Form
{
if (this.formPool.ContainsKey(form_id))
{
if (formPool[form_id] != null && !formPool[form_id].IsDisposed)
return formPool[form_id] as formType;
else formPool.Remove(form_id);
}
formType ret = null;
try
{
ret = Activator.CreateInstance<formType>();
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
}
Debug.Assert(ret != null);
return ret;
}
}
public class Test
{
public void dotest()
{
FormpoolClass fpc = new FormpoolClass();
CustomForm f = fpc.GetForm<customform&rt;("myform_id");
}
}
</customform></font></font>
Standards are great! Everybody should have one!
|
|
|
|
|
That's exactly how I'd do it as well. Have yourself a 5 sir.
|
|
|
|
|
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
|
|
|
|