Click here to Skip to main content
15,885,537 members
Home / Discussions / C#
   

C#

 
QuestionI cant Save Appconfig key!!! Pin
mrcooll29-Dec-08 20:25
mrcooll29-Dec-08 20:25 
AnswerRe: I cant Save Appconfig key!!! Pin
#realJSOP29-Dec-08 23:37
mve#realJSOP29-Dec-08 23:37 
AnswerRe: I cant Save Appconfig key!!! Pin
Mark Salsbery30-Dec-08 6:20
Mark Salsbery30-Dec-08 6:20 
QuestionWhen using reflection,how to get the field without creating a instance? Pin
Morven Huang29-Dec-08 19:58
Morven Huang29-Dec-08 19:58 
AnswerRe: When using reflection,how to get the field without creating a instance? Pin
N a v a n e e t h29-Dec-08 20:56
N a v a n e e t h29-Dec-08 20:56 
AnswerRe: When using reflection,how to get the field without creating a instance? Pin
Mark Churchill30-Dec-08 0:46
Mark Churchill30-Dec-08 0:46 
AnswerRe: When using reflection,how to get the field without creating a instance? Pin
Morven Huang3-Jan-09 16:20
Morven Huang3-Jan-09 16:20 
QuestionProblem with my numeric text box user control Pin
Anu Palavila29-Dec-08 19:25
Anu Palavila29-Dec-08 19:25 
Hai
Me with C#.net I want to make a text box to accept only numbers and decimal points(decimal point only once), so I tried to make a user control and is working fine except one problem. If if select all the data in the text box and try to enter a new value decimal point will not accept until I press the backspace. My user control code is a follows

string i;
int f;

public string Text
{
get
{
return NMTextBox.Text;
}
set
{

NMTextBox.Text = value;

}
}
private void NMTextBox_KeyPress(object sender, KeyPressEventArgs e)
{
try
{
string numaric = NMTextBox.Text;
for (int j = 0; j < numaric.Length; j++)
{
char myChar = numaric[j];
}
if (NMTextBox.Text == "")
{
f = 0;
}
if (e.KeyChar.ToString() == ".")
{
++f;
if (f >= 2)
{
e.Handled = true;
}
}
if (i == "8")
{
f = 0;
for (int j = 0; j < numaric.Length - 1; j++)
{
if (numaric[j].ToString() == ".")
{
++f;
}
}
}
if (e.KeyChar.ToString() != "." && Char.IsNumber(e.KeyChar) != true)
{
if (i != "8")
{
e.Handled = true;
}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.StackTrace, ex.Message.ToString());
}
}

private void NMTextBox_KeyDown(object sender, KeyEventArgs e)
{
i = e.KeyValue.ToString();
}

Thanks & Regards

QuestionHow to convert the code into C#, windows application Pin
Syed Naushad S29-Dec-08 18:29
professionalSyed Naushad S29-Dec-08 18:29 
AnswerRe: How to convert the code into C#, windows application Pin
dan!sh 29-Dec-08 18:56
professional dan!sh 29-Dec-08 18:56 
AnswerRe: How to convert the code into C#, windows application Pin
Nouman Bhatti29-Dec-08 19:55
Nouman Bhatti29-Dec-08 19:55 
AnswerRe: How to convert the code into C#, windows application Pin
Vimalsoft(Pty) Ltd29-Dec-08 22:28
professionalVimalsoft(Pty) Ltd29-Dec-08 22:28 
Questionxml Pin
sevda2029-Dec-08 18:25
sevda2029-Dec-08 18:25 
AnswerRe: xml Pin
Lev Danielyan29-Dec-08 18:59
Lev Danielyan29-Dec-08 18:59 
AnswerRe: xml Pin
Nouman Bhatti29-Dec-08 19:56
Nouman Bhatti29-Dec-08 19:56 
QuestionEvent for controls thet added when runing program Pin
hamidhakimi29-Dec-08 17:51
hamidhakimi29-Dec-08 17:51 
AnswerRe: Event for controls thet added when runing program Pin
Nouman Bhatti29-Dec-08 20:58
Nouman Bhatti29-Dec-08 20:58 
QuestionCAML query for a SQL statement [modified] Pin
Red October 729-Dec-08 17:30
Red October 729-Dec-08 17:30 
QuestionXmlNode? Pin
dec8229-Dec-08 15:06
dec8229-Dec-08 15:06 
AnswerRe: XmlNode? Pin
Colin Angus Mackay29-Dec-08 15:09
Colin Angus Mackay29-Dec-08 15:09 
AnswerRe: XmlNode? Pin
dec8229-Dec-08 15:27
dec8229-Dec-08 15:27 
GeneralRe: XmlNode? Pin
Colin Angus Mackay29-Dec-08 15:32
Colin Angus Mackay29-Dec-08 15:32 
GeneralRe: XmlNode? Pin
vaghelabhavesh29-Dec-08 16:49
vaghelabhavesh29-Dec-08 16:49 
QuestionCubes Intersection Pin
Danimismo29-Dec-08 12:46
Danimismo29-Dec-08 12:46 
QuestionSaving hidden panel contents to an image - GDI+ Pin
eliohim200529-Dec-08 11:14
eliohim200529-Dec-08 11:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.