|
SörenH wrote:
But I did not find a way to display such a chart in my application.
You simply can't. Before you can do so, your app must support Active documents, which is a feature expected to come with the next VS.NET release, next year.
Active documents are supported in good ol' MFC/WIN32/ATL/COM programming environments;
Alternative suggestion, the web office components is free. It's an ActiveX and as such can be hosted in an app or in a web page. Lookup msdn for owc10.exe (office xp version).
RSS feed
|
|
|
|
|
Stephane Rodriguez. wrote:
You simply can't.
Well, you can, but it's sort of a hack - display the chart in an Excel sheet in a WebBrowser control.
|
|
|
|
|
Right, although from wiu the poster wants to program against it. At this point, i think he should definitely take the route of owc.
RSS feed
|
|
|
|
|
Hello Stephane,
I'll take a look at this.
Thank you!
|
|
|
|
|
Hai there,
This is probably a mathematical discussion, but I trusted your great minds...
I have a circle divided into 10 equal (pie)chuncks. When I click anywhere in the circle I need to know which (pie)chunck I'm in.
How to calculate/recognize this?
thanx,
Octavie
|
|
|
|
|
I forgot to mention I have a circle image on a WinForm and I'm coding with C# (obviously...)
|
|
|
|
|
<br />
Convert.ToInt32(Math.Floor(5 * (Math.Atan2(click.Y - centerOfCircle.Y, click.X - centerOfCircle.X) / Math.PI + 1)))<br /> will give you a number between 0 and 9 representing the segment that was click, counting clockwise from the left.
--
-Blake (com/bcdev/blake)
|
|
|
|
|
Thanx,
I already had this solution and it works great! I'm building a usercontrol with a Dartsboard. That's why I needed the "piechunk" recognition... I also have the next step ready: did I click one of the rings (double, triple, single or double bull)
If everything is done I will publish it on CodeProject...
grtz,
Octavie
|
|
|
|
|
convert the x,y location into polar coordinates...
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
How can i verify if a proxy obtained by an Activator.GetObject call is still referencing a valid real object?
Is it possible only by catching an exception?
rechi
|
|
|
|
|
Hello,
is there a way to retrieve basic information about a certain volume like a CD-ROM or harddrive?
Such attributes like
Size
free space
serial number of the current volume or harddrive
and so on
I'd prefer a way that does not need any C++ or delphi dll's
Is there no Class in C# that provides such information.
Thanks for any help,
Sören
|
|
|
|
|
|
thanks a lot.
I guess this will solve my problems.
|
|
|
|
|
By default when I search a String in another String its case-sensitve(Using String.IndexOf() ),How can change it to case-insensitive?
Mazy
No sig. available now.
|
|
|
|
|
|
This does not work on all cultures.
For example, in the Danish language, a case-insensitive comparison of the two-letter pairs aA and AA is not considered equal. In the Vietnamese alphabet, a case-insensitive comparison of the two-letter pairs nG and NG is not considered equal.
For more information, see the topic "Culture-Insensitive String Operations" on MSDN.
Help me dominate the world - click this link and my army will grow
|
|
|
|
|
|
s1.ToLower().IndexOf( s2.ToLower() )
|
|
|
|
|
I usually use a System.Text.RegularExpression object with the
RegexOptions.IgnoreCase option applied. Here's an example of a string replace function I use for this:
private string CaseInsensitiveReplace(string sMain, string sReplaceThis,
string sWithThis)
{
return Regex.Replace(sMain, sReplaceThis, sWithThis,
RegexOptions.IgnoreCase);
}
You could use the Match method of a Regex object to perform a find.
|
|
|
|
|
Hi,
I was experimenting on the printing functions and found out you can get a lot of information about a printer trough System.Drawing.Printing.PrinterSettings. But I'm missing the minimum margins where the printer can print.
Most printers can't print to the edges of a page. These margins varies for eacht printer. Where can we find this information?
The Margins class allow to set margins, but it doesn't get the minimum margins of a specific printer. What I need is really the margin where a printer can't print.
For example a HP OfficeJet d155 minimum margins are
Left: 0,34 cm
Right: 0,93 cm
Top: 0,00 cm
Bottom: 0,67 cm
How can we get this information in .NET (maybe in pixels or inches)?
thx
|
|
|
|
|
I was able to add 15,000 strings to a list box in C# about 3 times faster than using MFC. It makes me wonder if .NET uses virtual list boxes. Anyone know?
When all else fails, there's always delusion.
- Conan O'Brien
|
|
|
|
|
I added half a million (424,379) and it took roughly about 5 minutes....
How long did yours take?
/\ |_ E X E GG
|
|
|
|
|
The 15,000 items took about .1 seconds in .NET. My original test was taking .35 seconds in MFC/C++. After some work, the tests on a different, slower, system took .2 seconds in .NET and .4 seconds in MFC.
Do note that on additions as large as yours, paging starts affecting performance.
When all else fails, there's always delusion.
- Conan O'Brien
|
|
|
|
|
for(int i=0; i<data.Length; i++)
{
logForm.listBoxLog.Items.Add(DateTime.Now.ToString("hh:mm:ss:ff")+": ["+data[i].ToString()+"]");
}
and i'm guessing that the "DateTime.Now" is slowing it down too, correct?
/\ |_ E X E GG
|
|
|
|
|
Probably not as much as you might think. The DateTime functionality will be paged in and in such a tight loop may be entirely in the CPU secondary cache. In smaller amounts, the memory allocator in .NET is more efficient than that in C++, but I've already accounted for that by testing with preallocated objects.
Of course adding a hundred thousand items to a list box is generally a bad idea, thus the question as to whether the .NET box is a virtual box.
When all else fails, there's always delusion.
- Conan O'Brien
|
|
|
|