|
I think it is strange...
I have just made a sample with 3 forms...
One as MdiParent, One as Children and One as Modal...
and everthing works...
the code is this... as normal as you can Imagine... so thats why I don't understand what is happening to you... maybe you have some property in the forms that is doing this behaviour
//Code in Form1 ( the Mdi Parent )
Form2 f = new Form2();
f.MdiParent = this;
f.Show ();
// Code in Form 2
Form3 f = new Form3();
f.ShowDialog ( this );
I am really surprised about your error...
Good Luck
Ricardo Casquete
|
|
|
|
|
Atlast i found out the cause, but not the solution... If u can tell me the solution that would be great..
In the background a thread is running checking whether the Time has elapsed for the application(i.e Application is idle or inactive for certain period), In that thread i am trying to show the showdialog.
The Application parent thread is running which hold the instance of Parent form (which should be MDIparent of dialog), but it is not..
In my app dialog is running in a separate thread and the application MDI parent is running in separate thread. When i tried to assign the MDI parent of Dialog i got an exception as follows.
Please let me know if you have any solution or workaround for this...
Exception occured: Controls created on one thread cannot be parented to a control on a different thread.
Parameter name: value
|
|
|
|
|
how can i set the property of printer according to valus saved in any file??
|
|
|
|
|
I am doing socket programming in c#.I could have accessed all drives,files and folders of a remote system to my local system.How do I access Icons of all the files and folders of a remote system?.Now all the fileNames and folderNames of remote system will display in my local system .I need to display the Icons also.
I think we can do that with the file extension of that file name.Means
we have to create the Icons with in local machine with the file extension of
Remote machine file name.
Is there anybody knows any solution for this please replay me as soon as possible.
cheers
Deepthi.
Deepthi Wilson.
|
|
|
|
|
Hi there
I Can't access Mdi Form's Statusbar from Child Form.
mdi form is "mdiMain" and child form is "form1".
I set Statusbar's modify to public , but when in child form i typed "mdiMain." i couldn't access StatusBar1 !!!
Please help me.
|
|
|
|
|
Haven't worked with MDI in .NET but as far as I know there is a Parent property on the child form or something like this. You can access the status bar from there I supose.
--------------------------------------------------------
My development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Hello,
I want to access a property dynamically.
e.g.
[code]
class A{
private int i;
public int I{
get{return i;}
}
}
[/code]
now I have a instance of this class and I want to access in the way:
instance.Get("I"); and this should return my i...
I know that Reflection is the way to do that, but how?
Regards
Hansjörg
|
|
|
|
|
|
Are there some free tools to show the performance of my app on XP?
Request:
1.process can be assigned
2.the threads in my app
3.memory used( whether GC.Collect works and memory generation)
thank you very much
|
|
|
|
|
You could use
a. Devpartner profiler from compuware
b. CLR profiler
[URL]http://www.microsoft.com/downloads/details.aspx?FamilyId=86CE6052-D7F4-4AEB-9B7A-94635BEEBDDA&displaylang=en [/URL]
|
|
|
|
|
These are very good tools, I finally selected CLR profiler because of the lost cost.
Thanks a lot.
|
|
|
|
|
|
Hi,
I have an ftp application which is a VB application, which transfers files in a given directory of host machine to another machine.
I need to call this application from a C# windows service.
How can I do it? Its very urgent...
Thanks in Anticipation
|
|
|
|
|
hi all
I want to serialize a usercontrol and pass it thru web service. is that possible. if not how can we pass a usercontrol thru web services?
Rajanikanth A.B
|
|
|
|
|
Why don't you tell us what you are trying to accomplish, instead of asking how to do it the way that you think that it's done?
---
b { font-weight: normal; }
|
|
|
|
|
i want my usercontrol to se serialized(from web service) and sent as bytes and to be deserialized at the client machine.how to do it? can we serialize the usercontrol? how to maintain its state
Rajanikanth A.B
|
|
|
|
|
What Guffa meant is: Why are you wanting to serialise a usercontrol? It seems such an odd thing to want to do that your problem may be better solved a different way.
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
I want to multiplication like orderqty*rate=amount in c# datagrid windows appliction without using any button control when the cursor goes to the fild of amount inthe datagrid it should multiply the values given in the field of orderqty,rate if you need more description me ask me through email cutegirl_doctor@yahoo.co.in
I am a software developer in
c# dotnet located in bangalore india
|
|
|
|
|
You can use Datacoulumn.Expression property.
code from msdn
[CODE]
private void CalcColumns(){
DataColumn cPrice;
DataColumn cTax;
DataColumn cTotal;
DataTable myTable = new DataTable ();
// Create the first column.
cPrice = new DataColumn();
cPrice.DataType = System.Type.GetType("System.Decimal");
cPrice.ColumnName = "price";
cPrice.DefaultValue = 50;
// Create the second, calculated, column.
cTax = new DataColumn();
cTax.DataType = System.Type.GetType("System.Decimal");
cTax.ColumnName = "tax";
cTax.Expression = "price * 0.0862";
// Create third column.
cTotal = new DataColumn();
cTotal.DataType = System.Type.GetType("System.Decimal");
cTotal.ColumnName = "total";
cTotal.Expression = "price + tax";
// Add columns to DataTable.
myTable.Columns.Add(cPrice);
myTable.Columns.Add(cTax);
myTable.Columns.Add(cTotal);
DataRow myRow;
myRow = myTable.NewRow();
myTable.Rows.Add(myRow);
DataView myView = new DataView(myTable);
dataGrid1.DataSource = myView;
}
[/CODE]
|
|
|
|
|
I have a problem:
In VB.NET code: AddHandler m_PacketMonitors(i).NewPacket, AddressOf OnNewPacket
Legend: NewPacket is event, OnNewPacket is sub
So I want to convert this code to C#!
I tried many ways to convert but it didn't work!
Please help me this problem and explain how it works!
Thanks a lot!
Mai Duc Khanh
Senior of DaNang University, VietNam
|
|
|
|
|
In C# you need to know what type of delegate the vent needs. Assuming the the event delegate is named EventHandler (the default one for many events) the code would look like this:
m_PacketMonitors(i).NewPacket += new EventHandler(OnNewPacket);
Also note that the Visual Studio designer greatly helps. If you type until += the designer should automatically popup some stub with the correct delegate.
|
|
|
|
|
Thank you for your support!
Thanks a lot!
Mai Duc Khanh.
|
|
|
|
|
Hi,
I am using Windows Form (C# Express 2005) .NET 2.0
I have a background worker who always read an XML file and do some work. At the same time an user can open the same XML file, do some changes and save the XML file. Now, Some times My application is throwing XML file read error etc... when the backgroundworker conflicts the read and save process of XML. Can you please show me the way to lock the XML file so that they dont conflict, rather wait for the other thread finishes its work.
Thanks
|
|
|
|
|
|
Thanks for your reply.
the article looks not so simple. I thought some easy short snippet could do this work. Is not there any easy snippet available ?
|
|
|
|