|
HAHAHA, it was in fact a flaw that it was being caught in some cases in .NET 1.1. In .NET 2 its totally uncatchable. There is something very wrong with your code if u hit a stack overflow. Sometimes however, you might just have a lazy recursive method (like probing a double linked list without tail calls). Those you should be aware of in the 1st place. From my experience the runtime stack allows up to around 16K nested stacks, by default. Add some counters like:
try
{
count++;
if (count > 15000)
return null;
return foo;
}
finally
{
count--;
}
|
|
|
|
|
hi,
I have two tables
Table1:Cust_Master CustID (identity type) CustName
Table2: Customer details
CustID
CustName
CustAddress
Cust phone
....
The tables are designed as: if the customer details has to be added it has to be first added to the Cust_master then get the Cust_Id (which gives autogenerated key) and then add it to Customer details table.
Now:
I want to show a editable datagird in WinForms where I give the user an option to add/modify and delete the customer details.
Can any give me the idea of how I can accomplish this.
Thanks
Satishrg
-- modified at 13:31 Wednesday 19th April, 2006
|
|
|
|
|
Hi i'm creating add-in in C# in order to create a list of the Project references for the entire solution. From my understanding, when you import a COM object ( ocx or dll) it creates a wrapper around the COM object and it names the wrapper Interop.<filename>.dll regardless if its a ocx or dll. I am using the DTE and VSproject objects to access the references collection for each project in the solution within my add-in . My problem is, the reference collection is pointing to the wrapper local copies. I wish to display the absolute original path of the reference. Basically instead of getting the wrapper Interop.filename.dll i want it to have the original filename.ocx or filename.dll
|
|
|
|
|
I have a text box to get info off the user. It should be an int but i cant be sure so i must validate it first. How do I tell if a string is an int? I know i could do Convert.toInt.... and put it in a try catch but is there another way? Thanks in advance
|
|
|
|
|
try int.TryParse()[^]
Look up the overloads too, because it intially expects an int with no formatting whatsoever, but using system.globalization.numberstyle.* you can have it automaticlly handle commas, currency symbols, etc.
|
|
|
|
|
|
You could use a regular expression to test the string to see that all characters are numeric.
Somthing like:
private static Regex _isNumber = new Regex(@"^\d+$");
public static bool IsInteger(string theValue)
{
Match m = _isNumber.Match(theValue);
return m.Success;
}
*not tested
Louis
* google is your friend *
-- modified at 16:36 Wednesday 19th April, 2006
|
|
|
|
|
You can also try to capture the KeyPress event on the text box and check the user input.
void TextBox1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
if(!Char.IsDigit(e.KeyChar) && e.KeyChar != (char)8)
{
e.Handled = true;
}
else
{
e.Handled = false;
}
}
(char) 8 is the backspace key...so the user can actually delete the entry as well !
|
|
|
|
|
Are there any good UI design web sites that i can look in to ?
especially concerned with business application UI design ?
Thanks!
|
|
|
|
|
Doing a google for Common User Interfaces came up with this white paper on CUI Standards[^]
|
|
|
|
|
I am trying to set a userdefined dataset as report datasource.
Ans actually my problem is, I am adding one column to a dataset table, and I am sending data to this column. Now I want to add this dataset to report datasource.
rosenvas
|
|
|
|
|
I have a big Problem with an Word Export from C#. I want to create a Table where I write two words in a Cell. I want to have the first one Bold = 1 and the second one Bold = 0, but I can´t seperate the two words. When I write Cell(1,1).Range.Bold = 1 then the whole Cell is Bold 1. Is there a posibility to write two different Words in one Cell with different Bold.
Cell like:
Word1
Word2
-- modified at 11:32 Wednesday 19th April, 2006
Kann auch Deutsch
|
|
|
|
|
Hi.
I need a sample code for running two threads simultaniously that each of threads fill own progress bar?
Best wishes
|
|
|
|
|
There are two discussions of threading within one page of this post, a tutorial in MSDN on threading, a help topic on your own machine if you installed the help files, etc. etc. Are you getting a feel for what you should do FIRST before asking questions on the forum? Once you have the basics, then ask questions about the parts you can't get working.
|
|
|
|
|
hi^^ I'am korean student.
I want to know software information( include software version ) that is installed in window.
( you can see Start - Control Panel - Program Add/Remove ^^;;
i.e Internet explorer, Microsoft word 2003, Microsoft powerpoint, etc..)
I knew how to get a hardware information. I searched code project site.
But I didn't search a software information.
Can you teach me how to get a software information? or related site.
please^^;;
Nothing!! But gonzo!!
-- modified at 10:59 Wednesday 19th April, 2006
|
|
|
|
|
|
thank you^^
It's nice hint^^b
"You can access the registry via the Registry class in the Microsoft.Win32 namespace."
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
Nothing!! But gonzo!!
|
|
|
|
|
I use visual studio .net 2003
but I don't have Microsoft.Win32 namespace^^;;
make project - SolutionExplorer - Reference - Reference Add( translate Korean )
I can't see it.
How to get Microsoft.Win32??^^;;
System.Environment too...^^;;
Nothing!! But gonzo!!
|
|
|
|
|
It is not in a separate assembly. Although named with a different namespace these classes (Registry etc) is located in mscorlib (this one is normally always referenced - its the base for every .Net app). Putting a using Microsoft.Win32 at the top of your class(es) should just be fine.
|
|
|
|
|
thanks!!
I didn't know.
Everthing is very good!!^^b
Nothing!! But gonzo!!
|
|
|
|
|
Hi.
How can I manage the close button of a form ?
I want when user clicks the close button(in title Bar of a form), I determine what happenning(instead of closing form).
Best wishes
|
|
|
|
|
Catch the Closing event or override OnClosing within the form. It provides CancelEventArgs which you can use to cancel the closing (and instead do something else).
|
|
|
|
|
Hi,
I was trying to create a print dialog via System.Drawing.Printing.PrintDialog, but it seems to be the old bad one common dialog as in MFC,WinAPI. Windows 2000 and XP must have more estetic version of that because notepad, IE a some another commercial application have it. But I cannot find where
Could you help me ?
thankx, Wizard_01
|
|
|
|
|
|
I didnt say Print Preview, but Print Dialog, it's where you can chooose the printer
Wizard_01
|
|
|
|