Click here to Skip to main content
14,608,023 members
   

C#

 
QuestionI cant Save Appconfig key!!! Pin
mrcooll29-Dec-08 20:25
Membermrcooll29-Dec-08 20:25 
AnswerRe: I cant Save Appconfig key!!! Pin
#realJSOP29-Dec-08 23:37
mva#realJSOP29-Dec-08 23:37 
AnswerRe: I cant Save Appconfig key!!! Pin
Mark Salsbery30-Dec-08 6:20
MemberMark Salsbery30-Dec-08 6:20 
QuestionWhen using reflection,how to get the field without creating a instance? Pin
Morven Huang29-Dec-08 19:58
MemberMorven 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
MemberN 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
MemberMark 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
MemberMorven Huang3-Jan-09 16:20 
QuestionProblem with my numeric text box user control Pin
Anu Palavila29-Dec-08 19:25
MemberAnu 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
lw@zi 29-Dec-08 18:56
professional lw@zi 29-Dec-08 18:56 
AnswerRe: How to convert the code into C#, windows application Pin
Nouman Bhatti29-Dec-08 19:55
MemberNouman 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
Membersevda2029-Dec-08 18:25 
AnswerRe: xml Pin
Lev Danielyan29-Dec-08 18:59
MemberLev Danielyan29-Dec-08 18:59 
AnswerRe: xml Pin
Nouman Bhatti29-Dec-08 19:56
MemberNouman Bhatti29-Dec-08 19:56 
QuestionEvent for controls thet added when runing program Pin
hamidhakimi29-Dec-08 17:51
Memberhamidhakimi29-Dec-08 17:51 
AnswerRe: Event for controls thet added when runing program Pin
Nouman Bhatti29-Dec-08 20:58
MemberNouman Bhatti29-Dec-08 20:58 
QuestionCAML query for a SQL statement [modified] Pin
Red October 729-Dec-08 17:30
MemberRed October 729-Dec-08 17:30 
QuestionXmlNode? Pin
dec8229-Dec-08 15:06
Memberdec8229-Dec-08 15:06 
AnswerRe: XmlNode? Pin
Colin Angus Mackay29-Dec-08 15:09
MemberColin Angus Mackay29-Dec-08 15:09 
AnswerRe: XmlNode? Pin
dec8229-Dec-08 15:27
Memberdec8229-Dec-08 15:27 
GeneralRe: XmlNode? Pin
Colin Angus Mackay29-Dec-08 15:32
MemberColin Angus Mackay29-Dec-08 15:32 
GeneralRe: XmlNode? Pin
vaghelabhavesh29-Dec-08 16:49
Membervaghelabhavesh29-Dec-08 16:49 
QuestionCubes Intersection Pin
Danimismo29-Dec-08 12:46
MemberDanimismo29-Dec-08 12:46 
QuestionSaving hidden panel contents to an image - GDI+ Pin
eliohim200529-Dec-08 11:14
Membereliohim200529-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.