|
He told you how to do that in his previous post - use whatever your criteria is for document uniqueness (i.e. path) as a key in a hashtable with the value being a reference to your mdi kid. When the abuser clicks on one of your leafs, check the hashtable for the existance of the key, if a value is found, make sure it's still valid, then call that mdi child form to the front, otherwise create a new mdi child as normal then register it in your hashtable.
|
|
|
|
|
As I said to you use hashtable to demonstrate this
in case you have treeview and tabcontrol like VS
it acttually not standerd tab but no problem
You can easly modify this to work with forms instead of tabcontrol and tabpages
HashTable ht=null;
and in form load event you init the Hashtable
ht=new HashTable(); ;
now suppose the user double click on tree view
if the tabcontrol have tabpage select it if not add new one
private void treeView1_DoubleClick(object sender, System.EventArgs e)
{
if(ht.Contains(treeView1.SelectedNode.Text))
{
tabControl1.SelectedTab=(TabPage)ht[treeView1.SelectedNode.Text];
}
else
{
TabPage newTab=new TabPage();
newTab.Text=treeView1.SelectedNode.Text;
tabControl1.TabPages.Add(newTab);
ht.Add(treeView1.SelectedNode.Text,newTab);
}
}
MCAD
|
|
|
|
|
Thanks
I have found that way:
<br />
private bool FindChild(string caption)<br />
{<br />
foreach (Form frm in MdiChildren)<br />
if (frm.Text == caption)<br />
{<br />
frm.BringToFront();<br />
return true;<br />
}<br />
return false;<br />
}<br />
Is it valuable? At least, it works fine too
Fred.
There is no spoon.
|
|
|
|
|
How can i set a value to a property of an object inheritant MarshalByRefObj at client side
|
|
|
|
|
Nothing special you need to do, just set the property as you would if you had a reference to the actual object.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
hii all;
i got a serious problem. i return an xml file in a string from web service. when its serialized the xml serializer replaces tages '<' with its unicode &.. which make a problem to me.
how can i force the serializer to make some how my xml string const ,commented and don't change tages.
by the way i don't want change values to tages again with my own i wanted to be back as tages.
Thanks in advance.
marcoryos
|
|
|
|
|
You mean that the data is html encoded? "<tag>" turns into "<tag>"?
This is obviously needed if you put an xml document as data inside another xml document, as web services use xml to send the data.
When the soap message is parsed the data will be restored to it's original state.
---
b { font-weight: normal; }
|
|
|
|
|
yes but the problem is when i got the data back
i don't wanna parse it i wanna save it as its on xml file. The destenation program written in c standard so i have to change the the codes by my self into tages which headach i don't want to. is there any way to transfer file without allowing soap serializer to do soo. i tried to comment xml tages and use CDATA but it changes to
marcoryos
|
|
|
|
|
If you don't want to parse the response, just save it as it is. But you won't get the data from the response before you parse it.
---
b { font-weight: normal; }
|
|
|
|
|
Hi all,
I have a question.
Any value type variable is allocated on Stack and Any reference type variable is allocated on Heap. Now lets say i have a class defined as:
class Box
{
int a;
int b;
int c;
...
}
Now somewhere in the code it is written,
Box myBox = new Box();
Now obviously myBox object is created on Heap.
My Question is where the variables 'a', 'b', 'c' has been created, on Stack or on Heap???
Chiranjib
|
|
|
|
|
They are created inside the object, in the heap.
---
b { font-weight: normal; }
|
|
|
|
|
ChiranjibC wrote:
Any value type variable is allocated on Stack and Any reference type variable is allocated on Heap.
No, the correct would be saying "Any value type local variable or method argument is allocated on Stack and Any reference type variable is allocated on Heap.
I see dead pixels
Yes, even I am blogging now!
|
|
|
|
|
Hi
In my project there is a option for news letters. I want to check that the E-mail IDs enter by the users exists or not .How can I do this using C#.
Thanks in Advanced
Alok
Alok
|
|
|
|
|
The System.Networking.Messaging.EmailVerification class, of course! It has a static method, "Verify" that will tell you whether any text string is a valid, active email address. It doesn't even have to access the internet to do so - amazing bit of code actually.
|
|
|
|
|
Uhhh...yeah, what have you been smoking, injecting, snorting, licking, ...?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Your sarcasm detector is in need of service.
|
|
|
|
|
It wasn't my sarcasm detector I was questioning. What would the OP think about that post?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Your Qestion have many faces one of the
1-You mean is it really exit or fake email address that have valide format but dos not exit in reallity
on i think you can send send test mail message and chech the response or make user reply to your message to complete his subscribtion to newsletters
2-You mean this email address have subscribe before or not
if you store those email address in db or xml file or any thing you can search for it in those data store
3-You mean the validation like above response said
and you can use regular expression as if it is not valide
it will be not exist
MCAD
|
|
|
|
|
There is no function to verify an email address. Ever sign up for a subscription or anything? You'll get a confirmation email that says something like, "click on this link to validate your email address." This is the system verifying that your email address is valid. There's really no other way to do it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I want to add a panel from a menu item, my problem is that if i dock the panel to the right, it will push my toolbar and statusstrip to the left and occupy their space, same with docking to left but oposite offcourse. If i dock it down it will go below my statusstrip and push it up, and if i dock it up it will do the same with my toolstrip. The only docking that works "properly" is fill. How can i have my panle docked to an edge without it moving my status- or toolstrip around?
Here is the simple code i use:
Panel myPanel = new Panel();
myPanel.Dock = System.Windows.Forms.DockStyle.Fill;
myPanel.Location = new System.Drawing.Point(0, 49);
myPanel.Size = new System.Drawing.Size(200, 408);
this.Controls.Add(myPanel);
|
|
|
|
|
Add one more Panel with DockStyle.Right and add the toolbar and statusstrip to it. Then add the new Panel as above.
Live Life King Size
Alomgir Miah
|
|
|
|
|
HOw Can i do Editable Listview?
|
|
|
|
|
ListView.LabelEdit = true;
Live Life King Size
Alomgir Miah
|
|
|
|
|
I mean all cells on detailed listview .
|
|
|
|
|
This is an excellent article. Gives exactly what you need
http://www.codeproject.com/cs/miscctrl/ListViewCellEditors.asp
Live Life King Size
Alomgir Miah
|
|
|
|