|
That's interesting..
I am currently using balloon tooltip handling from before .NET 2.0 which is limited to 256 characters.. but if I could get .NET 2.0 SDK working that would be great..
Might you know why I can't use the 2.0 balloon functions/structures? I installed .NET 2.0 SDK and am using Microsoft Visual Studio .NET 2003 but I can't see any of the .NET 2.0 code for handling the balloons.
Perhaps I need to update the MSDN documentation? I really don't know.
|
|
|
|
|
Hello
Just in case that .Net 1.1 tooltip class doesn't support more than 256 chars - I must tell you I strongly doubt it!!-, you should change the reference of "system.windows.forms.dll" of your project to the dll file in your .Net 2.0 SDK's folder. Remember, don't add it. Change it.
Regards
|
|
|
|
|
omgwoot wrote: I installed .NET 2.0 SDK and am using Microsoft Visual Studio .NET 2003 but I can't see any of the .NET 2.0 code
You can't use VS 2003 with .Net 2.0. Either purchase an 2005 version of VS or just use one of the freely available Express editions. They can be installed side by side and not interfere with each other.
Don't try to mix them. You will fail.
|
|
|
|
|
i want to show in a tree XML file, the problem is that i want the tree to have only the element name inner text, how can i do it, i always have a problem with the function:
<folders>
<folder>
<name>80
<folder>
<name>Madona
<media>
<file>C:\songs\80\Madona\Like a vergin.mp3
<file>C:\songs\80\Madona\papa.mp3
<folder>
<name>Madona
<media>
<file>C:\songs\80\Madona\Like a vergin.mp3
<file>C:\songs\80\Madona\papa.mp3
<folder>
<name>90
<folder>
<name>Metallica
<media>
<file>C:\songs\90\metallica\blackend.mp3
<file>C:\songs\90\metallica\unforgiven.mp3
what do you say
The tree should look like this:
80
madona
madona
90
metallica
Thanks
|
|
|
|
|
Your XML isn't displayed properly. Replace the < and > tags with [ ] and repost. People here understand that [ and ] map to < and > respectively. You might then get a quicker answer.
Regards
Angel
*********************************************
The sooner you fall behind, the longer you have to catch up.
|
|
|
|
|
|
Is there a way to run an app as a system-user on the compact framework?
I need to do some stuff with the certificate store, and I keep getting no-permission errors..
Help would be much appreciated !
|
|
|
|
|
I'm quite certain that the Windows Mobile supports RunAs.
|
|
|
|
|
Allright, that's good to know!
Then I'll just have to find out, how to actually do it.
|
|
|
|
|
I have a datagrid with a dataset table as it's datasource and a tree with a copy of the original dataset table as it's datasource. The datagrid dataset can be changed, but the tree needs to stay constant.
This is for a biology app. After I add nodes for each Family\Genus\Species to the tree I want to go back through it and add a (number) after each node to designate how many collections are under each node.
This works fine on faster processors but not on slower as the processors hit 100% and take up to 8 minutes to run. It takes 8 seconds when it doesn't hit 100%.
Here is the code that adds the (number) after each node:
public void AddCollectionsToNodes()
{
this.collectionTree.SuspendLayout();
this.CollectionsDataGrid.SuspendLayout();
string oldFilter = "";
if(dsCollections.Tables[0].DefaultView.RowFilter != null)
{
oldFilter = dsCollections.Tables[0].DefaultView.RowFilter;
}
try
{
foreach(TreeNode all in this.collectionTree.Nodes)
{
foreach(TreeNode family in all.Nodes)
{
string filter = "";
if(oldFilter.Trim().Length > 0)
{
filter = oldFilter + " AND Family_Name='" + family.Text + "'";
}
else
{
filter = "Family_Name='" + family.Text + "'";
}
dsCollections.Tables[0].DefaultView.RowFilter = filter;
int rowCount = dsCollections.Tables[0].DefaultView.Count;
family.Text += " (" + rowCount + ")";
if(rowCount > 0)
{
foreach(TreeNode genus in family.Nodes)
{
int count = 0;
for(int i = 0; i < rowCount; i++)
if(dsCollections.Tables[0].DefaultView[i]["Genus_Name"].ToString().Trim() == genus.Text.Trim())
count++;
genus.Text += " (" + count + ")";
if(count > 0)
{
foreach(TreeNode species in genus.Nodes)
{
count = 0;
for(int i = 0; i < rowCount; i++)
if(dsCollections.Tables[0].DefaultView[i]["Specific_Epithet"].ToString().Trim() == species.Text.Trim())
count++;
species.Text += " (" + count + ")";
if(count > 0)
{
foreach(TreeNode infra in species.Nodes)
{
count = 0;
for(int i = 0; i < rowCount; i++)
if(dsCollections.Tables[0].DefaultView[i]["Infra_Epithet"].ToString().Trim() == infra.Text.Trim())
count++;
infra.Text += " (" + count + ")";
}
}
}
}
}
}
}
}
}
catch ( System.Exception e)
{
MessageBox.Show (String.Format ("Error: {0}", e.Message), "Add Number of Collections to Family Nodes");
}
dsCollections.Tables[0].DefaultView.RowFilter = oldFilter;
this.collectionTree.ResumeLayout();
this.CollectionsDataGrid.ResumeLayout();
this.collectionTree.Nodes[0].Expand();
}
Thanks for any ideas!
RABB17
|
|
|
|
|
Look at the number of nested for loops you have and its no wonder it pegs the processor.
If you need to get the number of child nodes use node.Nodes.Count.
|
|
|
|
|
Problem is, (number) is not the number of child nodes, it's the number of collections that will be seen in the datagrid for that particular parent/child/child node.
|
|
|
|
|
Can you return the number of these collections from the database? Get a second resultset from your query and use it to populate the treeview.
|
|
|
|
|
Populate the treenode by issuing a select that returns COUNT and put that number in the node.
|
|
|
|
|
What is the best way to return more than one value back from a method?
I have a method that I'm calling that I want to return back some data, a primary key, and the datetime stamp. I was thinking of returning a struct back, but was wondering if there was a better way?
Tom
|
|
|
|
|
A struct or some out variables on the signature, depending on if the struct makes any sort of sense beyond being a way to return the values.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
You can also use "out" paramaters, which let you pass information back as a write only variable.
private string ReturnStuff(out var1, out var2)
{
var1=something;
var2=something;
return primaryKey;
}
Note these are Write-Only variables.
Aaron
|
|
|
|
|
Hi,
i need to display the selected folder name from a browse folder dialog on clicking "ok" button in another dialog in a text box,the user should not be able to edit this, i have disabled the text box on creation itself.Please help me with the code since i have to deliver my application by tomorrow evening.
Awaiting ur replies
Thanks
Shruthi
|
|
|
|
|
To pass info between forms, use a delagate.
x2pca wrote: Please help me with the code since i have to deliver my application by tomorrow evening.
That's very troubling.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Indeed. Asking for answers without try does not benefit students at a long run. It looks like a side effect of forum.
Best,
Jun
|
|
|
|
|
Hello guys, Jun, Christian
Well, why don't we help the newbies with code snippets? This would encourage them, and give them a head start, wouldn't it?
I mean.. Is it "cheating" if we help them with a line or two, just as an assistance in their projects? I don't endorse it as a habit, yet I think they sometimes deserve more help than mere general guidance don't you agree?
Regards
|
|
|
|
|
Yes, by all means. We should help those who have tried, not those who just pass the assignment to us.
Best,
Jun
|
|
|
|
|
Well, it sounds fair enough for me.
Thanks Jun.
Regards
|
|
|
|
|
x2pca wrote: Please help me with the code since i have to deliver my application by tomorrow evening.
Yeah right!!
If you're a student, get used to the fact that nobody is going to do your job for you. Nobody.
If you are already in the industry, why have you not figured that out yet?!?!?!?!?!
Good luck. The clock is ticking...
:josh:
My WPF Blog[^]
|
|
|
|
|
hi,
I create a dataset and fill it with access database. everything is fine, I can see the data in the binded grid control. but i have an exception when I do the copy operation. the exception says, the dataset can not pass the constrains (non null, foreign key...).
I think I can not create the first dataset if the data is wrong?
does anyone have idea about this?
Thanks a lot!
Alan Shen
MCAD for .NET Version
^~^~^~^~^~^~^~^~^~^~^
Great idea is the beginging of success!
|
|
|
|