|
You may be able to step into the code of the separate DLL if the debug symbols are available for it.
Is the dll raising the exception written in managed code (C#, VB.Net etc)? If so, compile it in debug mode and reset the reference in the calling application. You should be able to then either set a breakpoint immediately before the call raising the exception and "step into" the code that's having trouble, or just set the debug feature to break into the debugger on all exceptions.
The previous poster was correct, however, the error you're seeing is because somewhere you've got code indexing past the end of an array/collection. This commonly happens for a couple of reasons:
1. Developer forgets that arrays are 0-based (so the index of the last element is Array.Length - 1)
2. The collection is being shortened (items are being removed) within the code while an iterative loop moves from lowest to highest index (e.g. 0-10). Since each removal essentially re-indexes the collection, eventually an index will be selected that is past the end of the array.
Hope this helps
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
Hi!
I'm looking for two controls, one to do Gantt diagrams and another one to implement an Calendar in wich I could post dates (like outlook for example). Does anyone know any free control implementing one (or both) of this funcitonalities?
I'm developping a Windows Forms application.
Thank you!
Jordi
PS - If I don't find it I will try to develop them. If I do it i'll post them in this fabulous website!
"Catalonia is not Spain"
|
|
|
|
|
You are looking for some thing like 'Planner'. Microsoft Project Planner ?
Sreejith Nair
[ My Articles ]
|
|
|
|
|
Yes, something like that but I don't look for a program, I look for a control to be added to my .NET application. Do you know any free control like this? I don't need an espectacular control, a simple one implementing Gantt diagrams or a calendar would be perfect.
Thanks!
"Catalonia is not Spain"
|
|
|
|
|
|
|
I look for a Calendar in wich i could implement and Scheduler. I would like to be able to insert some text in a specific date. It is not possible in MonthCalendar, isn't it? I look for something like Outlook.
Thanks anyway!
"Catalonia is not Spain"
|
|
|
|
|
look at www.infragistics.com
|
|
|
|
|
Hello,
What is the CultureInfo format string for a decimal that I want to show with no trailing zeros?
1.000 is formatted as 1
1.100 is formatted as 1.1
1.010 is formatted as 1.01
1.001 is formatted as 1.001
Thanks in advance,
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
If you call the ToString method of your decimal the trailing zeros are automatically trimmed. To ensure the decimal separator is always a point provide a CultureInfo that uses this decimal separator, e.g.
CultureInfo culture = new CultureInfo("en-US");
decimal x = new decimal(1.010);
MessageBox.Show(x.ToString(culture));
www.troschuetz.de
|
|
|
|
|
Thanks for your reply, but that didn't solve my problem.
I have a DataGrid control, to which I assign a DataGridTableStyle . One of its DataGridTextBoxColumn s is supposed to display a quantity of the product sold. In most cases, you only can get products in multiples of 1 (bottles of water) but in rare cases (oil for example, the app is for a car wash) it can be sold in fractions.
The data field from the MSDE database is a decimal with scale 4, so the DataGrid always displays the value with 4 decimals. I'm trying to set the DataGridTextBoxColumn 's Format property so it trims trailing zeros, but I can't find how. I've set it successfully for other columns (currency) but not for this one.
Any more ideas?
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
I'm trying to do something like this:
OpenFileDialog xOpenFileDlg = new OpenFileDialog();
xOpenFileDlg.Filter = "All Images|*.png,*.bmp,*.jpg,*.gif,*.tif";
xOpenFileDlg.ShowDialog();
(i.e. make it show all the png, bmp, jpg, gif and tif files, but not anything else) - but I can't work out the proper syntax for the wildcard
can anyone help?
--
Help me! I'm turning into a grapefruit!
Phoenix Paint - back from DPaint's ashes!
|
|
|
|
|
nevermind - got it, semicolons
xOpenFileDlg.Filter = "All Images|*.png;*.bmp;*.jpg;*.gif;*.tif";
--
Help me! I'm turning into a grapefruit!
Phoenix Paint - back from DPaint's ashes!
|
|
|
|
|
1)how can I make properities or attributes in order(NOT SORT-LIKE) or take control them in order?
For example:
public string List
{
get { return m_strList; }
set { m_strList = value; }
}
public string List2
{
get { return m_strList2; }
set { m_strList2 = value; }
}
public string List3
{
get { return m_strList3; }
set { m_strList3 = value; }
}
it went like this:
List1
List3
List2
I dont know how did it do that.
I want to go like this
List2
List1
List3
can you tell me how to control these properties?
2)I am having struggle with changing color with using readonly
I am using those codes:
[ReadOnly(true)]
public string List
{
get { return m_strList; }
set { m_strList = value; }
}
I wanted to prevent the user to change the List but it changed the color black to light gray bec of readonly changed its color text. I tried to changed its text color(like ViewForeColor). No luck. what are your suggestions that how to change its text color?
Thanks in advance
|
|
|
|
|
how can i get the handle of popup form in my main form before it can get visible?...i want to destroy this form before user can see it...
|
|
|
|
|
In short, you can't. Also, it's very poor practice. You can get the handle, but it takes some searching with a couple of API functions. While this searching is going on, the window will have shown itself. After you get the handle, then you can send the WM_CLOSE message to it. But, there's no telling what will happen when you do this.
What are you trying to do? What window are you trying to supress? If it's part of your app, why would you want to quash a window that you put up?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
infact i'm using a tool on my form and it is trial but before loading this tool it shows a dialogbox and i want to close it...
|
|
|
|
|
You're kidding me, right? You want help suppressing a dialog that says that this is a trail version? Pay the author for the control and get the version that doesn't have that dialog box.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
if i had money i would buy it,but i dont
|
|
|
|
|
Don't expect help stealing someone elses work!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi Man,
If you come to know the method to supress the trial message dialog box. Please also pass the info. After getting the tricks, I won't spend dollars purchasing the tool.....
Great.....thinking........
|
|
|
|
|
|
Thanks for all helper here
now if i have textbox some times have value need parsing and another time null the parsing method desnt work when the textbox null and throw exception "input string was not in correct formt"
how can i stop parsing method if the textbox havnt any value
i tryed this code but it is not good to enter a zero in the field without value
if(txtPhone2.Text.Trim().Length !=0)<br />
{<br />
Phone2 = decimal.Parse(txtPhone2.Text.Trim());<br />
}<br />
else<br />
{<br />
Phone2=0;<br />
}
Thanks
|
|
|
|
|
Catch the exception:
decimal phone;
try
{
phone = Convert.ToDecimal(txtPhone2.Text);
}
catch(FormatException ex)
{
MessageBox.Show("Invalid phone number.");
phone = 0;
} This is called exception handling. Most .NET classes throw exceptions when something wrong happens (from invalid arguments to network errors) Take a look at the documentation, it's very useful to know about them.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
This still isn't correct because you're only accounting for cases in which the user leaves the field blank. An exception will still be thrown if the user enters something like "I can't remember" (don't laugh - if you don't think a user would enter something like that, you're not treating input as the evil thing it actually is) or "(760)347-1234". The second one is a valid phone number (at least where I am), but it's certainly not a decimal .
You could certainly make the value 0 if the TextBox does not contain a valid number, but as you mentioned, having a bunch of zeroes in your database masquerading as phone numbers won't do anybody any good.
So the question on the table is: What value should we enter into a nullable field in the database when we don't have a value to enter? Null seems like a good choice to me.
You should rewrite your SQL command to submit a valid phone number (how you validate it is up to you) if you have one, or null if you don't.
As an aside, I can understand the impulse to rephrase a question and ask it again in a new thread if you don't get a satisfactory answer right away, but the only thing that really accomplishes is clogging up the message board and irritating the people trying to offer assistance. Unless you're asking an unrelated question, please keep it in the thread you already started.
Charlie
if(!curlies){ return; }
|
|
|
|