|
I don’t think it has anything to do with the VC++ SDK not being installed. What you can do is to check if the MSChart control (mschrt20.ocx under windows\system32) is present and registered on the computer where you got the problem – if it’s missing, you have to install it. I’m not sure if you have to install MS Office or if it is enough (and legal) to copy and register the MSChart OCX file only.
Hope this helps!
|
|
|
|
|
Thanks for your valuable input.
how to install and register this mschrt20.ocx.
sorry for the inconvenience.
With Regards
Amjath
|
|
|
|
|
First copy the OCX file to windows\system32, then execute the following command
regsvr32 c:\windows\system32\mschrt20.ocx
More information about regsvr32 here, http://support.microsoft.com/kb/249873
|
|
|
|
|
Hi,
Can some one suggest a way that I can do the following
I'm populating a data table with rows read from a spreadsheet, however in some cases I want to only populate the number of items equal to the number of columns in the header record. So I can remove any spurious rows.
I'm populating the data table row item array from a string as follows
row.ItemArray = Line.Split(',');
What I'd like to do is remove any spurious items from the array using a count of valid columns.
I'd like to reduce the number of items in the item arry to a count that I have.
This would be nice if it were possible.
row.ItemArray.length = NumCols.
I'd be grateful for any suggestions.
Sean
|
|
|
|
|
Hi,
I'm using the following code to get round this
if (IgnoreExtraLines)
{
//reduce the fields to the number of column headings
string[] TempRowIn = finalLine.Split(',');
string[] TempRowOut = new string[dt.Columns.Count];
for (int i = 0; i < dt.Columns.Count; i++)
{
TempRowOut[i] = TempRowIn[i];
}
row.ItemArray = TempRowOut;
}
else row.ItemArray = finalLine.Split(',');
but it seems like quite an overhead !
Sean
|
|
|
|
|
From MSDN of VS 2005:
String.Split (String[], Int32, StringSplitOptions)
Returns a String array containing the substrings in this string that are delimited by elements of a specified String array. Parameters specify the maximum number of substrings to return and whether to return empty array elements.
What happens if you put in the number of columns of the table? That would be:
char[] charSeparators = new char[] {','};
row.ItemArray = finalLine.Split(charSeparators,dt.Columns.Count,StringSplitOptions.None);
-- If this is a post that has been helpful to you, please vote for it. Thank you!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
What happens is that you get a comma separated list of values in the last element in the array.
---
single minded; short sighted; long gone;
|
|
|
|
|
Oops, yes, true. It's even written in MSDN but I didn't take time to read it all.
Would it still be more efficient to split the remainder and take the first element?
-- If this is a post that has been helpful to you, please vote for it. Thank you!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
Talal Sultan wrote: Would it still be more efficient to split the remainder and take the first element?
That would create another array, so it would not be any more efficient.
---
single minded; short sighted; long gone;
|
|
|
|
|
Brilliant, I completely missed this, I thought I was going the long way about it.
Thanks.
Sean
|
|
|
|
|
Actually, you have to go the long way about it.
---
single minded; short sighted; long gone;
|
|
|
|
|
You can't resize an array in .NET. If you want an array of different size, you have to create a new array.
You can do it a bit more efficiently, though, by only creating a new array if the size actually is larger than the desired.
int count = dt.Columns.Count;
string[] tempRowIn = finalLine.Split(',');
if (IgnoreExtraLines && tempRowIn.Length > count) {
string[] tempRowOut = new string[count];
Array.Copy(tempRowIn, tempRowOut, count);
tempRowIn = tempRowOut;
}
row.ItemArray = tempRowIn;
---
single minded; short sighted; long gone;
|
|
|
|
|
Or you can call Array.Resize method but surprisingly a new array is allocated even if new size is less then old size
|
|
|
|
|
I have a com component developed in .Net. I consume this component from client through In Proc Server implementation. Is is possible to load this component in seperate appdomain? If yes, then how i can make calls to specific methods of com component from client?
Hope my question is clear. If not pls revert for more details.
Thanks.
|
|
|
|
|
Can any body help me out how to make a window as transperant window in .net2.0;
|
|
|
|
|
try setting the opacity property for the window...
HTH.
|
|
|
|
|
Actually my requirement is to display only the text which is present on the form without showing the form to the user.If i tries with opacity it is showing nothing.Everything becomes transperant.
|
|
|
|
|
don't put the text on the form as lable or something. instead paint the text using DrawText in OnPaint.
I'm not sure it will work or not. but you can try.
HTH.
|
|
|
|
|
Hello,
Set the "TransparencyKey" property equal to your forms BackColor.
All the best,
Martin
|
|
|
|
|
Hi Martin,
your idea is good bt here my forms backcolot is changing dynamically.How i can implement this one with tansperancykeycolor property.
|
|
|
|
|
Hello,
RameshwerE wrote: your idea is good
RameshwerE wrote: my forms backcolot is changing dynamically
You have to handle the BackColorChanged event and set it there accordingly.
this.BackColorChanged += new System.EventHandler(this.yourForm_BackColorChanged);
private void yourForm_BackColorChanged(object sender, System.EventArgs e)
{
this.TransparencyKey = this.BackColor;
}
Hope it helps!
All the best,
Martin
|
|
|
|
|
hello !!
Actually m a fresher n i have no idea what to do n which tech to get into . I hv got to work on java but in java i know nothing except core java . My Intereset is in >net n m not at all suer what to do plz do reply n hlp me out of dilemma
Mrinal
Mrinal
|
|
|
|
|
Please don't cross post. If I do a search on your user am I going to find lots and lots of posts asking the same question? If so, remove the ones that have no replies attached to them.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Could you at least make the effort of writing in correct English please?! As far as I know, we are not limited by the number of characters in a post and NO, writing in SMS format is NOT cool!
-- If this is a post that has been helpful to you, please vote for it. Thank you!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|