Click here to Skip to main content
15,905,508 members
Home / Discussions / C#
   

C#

 
GeneralRe: In 2nd form how i get (1st form userid) userid for lable using C# with Sql Server. Pin
Tom Deketelaere30-Dec-08 0:15
professionalTom Deketelaere30-Dec-08 0:15 
QuestionHow to print large images(jpeg) in C# Pin
sivasankar anumula29-Dec-08 22:34
sivasankar anumula29-Dec-08 22:34 
AnswerRe: How to print large images(jpeg) in C# Pin
#realJSOP29-Dec-08 23:36
professional#realJSOP29-Dec-08 23:36 
QuestionProblem with Timer Pin
vnr29-Dec-08 22:24
vnr29-Dec-08 22:24 
AnswerRe: Problem with Timer Pin
rah_sin29-Dec-08 22:30
professionalrah_sin29-Dec-08 22:30 
AnswerRe: Problem with Timer Pin
PC Player30-Dec-08 1:00
PC Player30-Dec-08 1:00 
AnswerRe: Problem with Timer Pin
PIEBALDconsult30-Dec-08 6:53
mvePIEBALDconsult30-Dec-08 6:53 
QuestionHow to draw a area of image? Pin
Hoang Jang29-Dec-08 21:27
Hoang Jang29-Dec-08 21:27 
AnswerRe: How to draw a area of image? Pin
Rob Philpott29-Dec-08 21:46
Rob Philpott29-Dec-08 21:46 
GeneralRe: How to draw a area of image? Pin
Hoang Jang29-Dec-08 21:54
Hoang Jang29-Dec-08 21:54 
GeneralRe: How to draw a area of image? Pin
Rob Philpott29-Dec-08 22:39
Rob Philpott29-Dec-08 22:39 
GeneralRe: How to draw a area of image? Pin
Hoang Jang29-Dec-08 22:53
Hoang Jang29-Dec-08 22:53 
QuestionApplication Security Pin
LogiSmith29-Dec-08 20:33
LogiSmith29-Dec-08 20:33 
AnswerRe: Application Security Pin
N a v a n e e t h29-Dec-08 20:54
N a v a n e e t h29-Dec-08 20:54 
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
professional#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 

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.