|
Hope This will helps you
create Excel graph in c#[^]
Best Regards
-----------------
Abhijit Jana
"Success is Journey it's not a destination"
|
|
|
|
|
i need help in c# , code is aailable there in the same language.but in few places, the code is quite confusing, datatype is not declared .i mean code is incomplete.
do u have any other link?
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
|
Hi all,
Im having problem with Simple style combobox.
actualy i have a form window with a combobox and other one is Textbox.
combobox style is Simple(CBS_SIMPLE). there is so meny text. when user type some text and hit enter key it will be select current item.
but its nothong happen. user have to press down arrow.
my question is this.
i don't wanna use down arrow key, i want to use enter key to sellect current item.
what its posible to change Keys event?
please give me any idia with small source.
thank you
bir
|
|
|
|
|
Member 4129218 wrote: when user type some text and hit enter key it will be select current item.
where should user , enter the text, is it in the text box?
i think you want, when user give some text in text box and press enter then it should add in combox box and current enterted text should be selected.
Please confirm
Best Regards
-----------------
Abhijit Jana
"Success is Journey it's not a destination"
|
|
|
|
|
Hi Abhijit Jana,
type in the Simple type of ComboBox.
Simple Stype comboBox Layout.
----------------
| Monitor \/ <- type monitor and hit enter
----------------
| Computer |
| Proccessor |
| Monitor |
----------------
This is a CBS_SIMPLE Type ComboBox.
When user type Listed item Monitors and hit enter, in that case Listed monitors must be highlighted.
i did alot but nothing happend.
in default user type listed item and press down key its work but i don't want that i need to effect by Enter key.
Please help me.
Sincerly Bir
|
|
|
|
|
Hi all,
please give me answer.
|
|
|
|
|
Hello all. I have a couple of questions regarding assemblies.
Can an assembly contain other assemblies?
Can an assembly directly contain types?
Any help would be appreciated. Thanks.
"If you don't know where you're going, you'll probably end up somewhere else." Yogi Berra
|
|
|
|
|
Check It[^]
Best Regards
-----------------
Abhijit Jana
"Success is Journey it's not a destination"
|
|
|
|
|
I'm using DataAdapter.Fill() in my ASPX code. It takes rather long time to be completed and if I refresh page in IE causing thereby second invocation of .Fill() I get the following exception:
There is already an open DataReader associated with this Command which must be closed first
How can I fix this error?
|
|
|
|
|
One DataReader per one connection.
When you refresh, another readers is instantiated for the fill method and the same connection is used and thus exception is thrown.
|
|
|
|
|
Don't do that.
Check to see if it's already filling before trying to fill?
Cancel the existing fill operation?
|
|
|
|
|
Ok, how can I do this checking?
|
|
|
|
|
Perhaps check the .IsClosed property?
/ravi
|
|
|
|
|
DataReader is connection based. When a DataReader is opened, it engross the connection till close it.
So, After you use a DataReder, you must close it immediately.
|
|
|
|
|
Hi
You can check with ConnectionState property.
|
|
|
|
|
Is your command object wrapped in a using block?
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
I noticed that in one of my applications, for some odd reason, I could not calculate for angles less than 45 degrees on my form. I created a point of origin at (150,300)- I'll call this Po - and then I use mouse_move to find my second point - Pm - on a form 300x300. As I move closer to the left and right side, my angle just stops at 45, and sadly does not go down. I've added break points to see what values I was coming up with, and even on a calculator, the angles should work out between Po and Pm . Is there a reason this doesn't work? I'll attach my code below. I'll also note that the code I have works specifically so that moving right, the angle is negative and moving left, the angle is positive- this is done for something I'm rotating.
try<br />
{<br />
<br />
if (e.X > 150 && e.X < lastx)<br />
{<br />
curangle = (float)((Math.Atan((300 - e.Y) / (150 - e.X))) * (-180 / Math.PI));<br />
}<br />
else if (e.X > 150 && e.X > lastx)<br />
{<br />
curangle = (float)((Math.Atan((300 - e.Y) / (150 - e.X))) * (180 / Math.PI));<br />
curangle = -180-curangle;<br />
}<br />
if (e.X < 150 && e.X < lastx)<br />
{<br />
curangle = (float)((Math.Atan((300 - e.Y) / (150 - e.X))) * (180 / Math.PI));<br />
curangle = 180 - curangle;<br />
}<br />
else if (e.X < 150 && e.X > lastx)<br />
{<br />
curangle = (float)((Math.Atan((300 - e.Y) / (150 - e.X))) * (-180 / Math.PI));<br />
}<br />
<br />
lastx = e.X;<br />
<br />
lblone.Text = Convert.ToString(curangle + " degrees");<br />
<br />
}<br />
catch (DivideByZeroException)<br />
{<br />
}
Thanks in advance guys
modified on Friday, May 9, 2008 3:37 PM
|
|
|
|
|
To calculate the angle why not just use:
float distanceBetweenPoints = Math.Sqrt(Math.Pow(e.X-150, 2)+Math.Pow(300-e.Y, 2));
float angle = ACos((e.X-150)/distanceBetweenPoints);
angle = angle*(180/Math.PI)
That should give the angle from the horizontal plane, anti-clockwise.
/
/
/
/ This angle here
/______________
My current favourite word is: Bacon!
-SK Genius
|
|
|
|
|
Thanks! Much appreciated I just had to inverse one thing, but it was so minor and now it works flawless. Thank you for the help ^^!
|
|
|
|
|
Hi
I work with some very large arrays (millions of items) in an algorithm, however, since most fields contains the value 0 I decided to use a Dictionary to represent only the array's fields where the value is not 0.
Dictionary means that the first int is the index of the array in which the value would appear, and the second int is the value of this index.
Now, I have two of these "arrays" that I need to compare. For each _existing_ index I need to find the difference between the arrays.
E.g. index i exists in dict1 (first dictionary) but not in dict2, thus the difference should be the value of dict1[i] alone. index i exists in both dictionaries thus the difference should be dict1[i] - dict2[i].
Now, in theory this should be possible to achieve with iterating each unique index in BOTH dictionaries only once (e.g. if an index occurs in both dictionaries it should only be iterated once)
My suggestion was that I start by getting the first item from each and compare the index of these.if they are equal I would increase both iterators.if one is higher than the other I would increase the iterator until they are equal or the other one is lower. This would be repeated until both are iterated through. Any ideas how I can do this with C# and Dictionary?
Any ideas? need to do this iteration as fast as possible. In C I could do some pointer magic to achieve this, but I am not familiar with C# dictionary iterators/enumerators so I have no idea whatsoever how to solve this.
|
|
|
|
|
If you have huge arrays where there are large amounts of "missing" information you'd be better off using a linked list.
|
|
|
|
|
Maybe have one collection (HashSet?) to hold the indices? Only remove an index from the collection if both arrays have 0 at that index.
|
|
|
|
|
A Dictionary is not sorted, so you cannot do that.
Go through dict1 and compare/find the difference with the respective value in dict2 (or with 0, if that value does not exist).
Then go though dict2 and test for each value if it is contained in dict1. If it is, we already compared it in the step above; otherwise compare 0 to the value.
|
|
|
|
|
Ah crap...then I need to create a linked list manually I guess...
|
|
|
|