Click here to Skip to main content
15,895,667 members
Home / Discussions / C#
   

C#

 
AnswerRe: Manipulate a 160 char text message Pin
stancrm28-Sep-09 22:06
stancrm28-Sep-09 22:06 
GeneralRe: Manipulate a 160 char text message Pin
Md. Marufuzzaman28-Sep-09 23:07
professionalMd. Marufuzzaman28-Sep-09 23:07 
AnswerRe: Manipulate a 160 char text message Pin
Keith Barrow29-Sep-09 0:01
professionalKeith Barrow29-Sep-09 0:01 
GeneralRe: Manipulate a 160 char text message Pin
Md. Marufuzzaman29-Sep-09 0:18
professionalMd. Marufuzzaman29-Sep-09 0:18 
QuestionClient - Server application using sockets? Pin
$uresh $hanmugam28-Sep-09 21:41
$uresh $hanmugam28-Sep-09 21:41 
AnswerRe: Client - Server application using sockets? Pin
stancrm28-Sep-09 22:03
stancrm28-Sep-09 22:03 
GeneralRe: Client - Server application using sockets? Pin
$uresh $hanmugam28-Sep-09 23:56
$uresh $hanmugam28-Sep-09 23:56 
GeneralRe: Client - Server application using sockets? crosspost Pin
Richard MacCutchan29-Sep-09 0:19
mveRichard MacCutchan29-Sep-09 0:19 
GeneralRe: Client - Server application using sockets? crosspost Pin
$uresh $hanmugam29-Sep-09 0:20
$uresh $hanmugam29-Sep-09 0:20 
AnswerRe: Client - Server application using sockets? Pin
SeMartens29-Sep-09 0:30
SeMartens29-Sep-09 0:30 
QuestionHow to change camera serttings in C#? Pin
Galonas28-Sep-09 21:18
Galonas28-Sep-09 21:18 
AnswerRe: How to change camera serttings in C#? Pin
Christian Graus28-Sep-09 21:24
protectorChristian Graus28-Sep-09 21:24 
QuestionUsing Nero from CSharp Pin
SenthilKM14328-Sep-09 20:47
SenthilKM14328-Sep-09 20:47 
AnswerRe: Using Nero from CSharp Pin
Christian Graus28-Sep-09 21:23
protectorChristian Graus28-Sep-09 21:23 
AnswerRe: Using Nero from CSharp Pin
Dave Kreskowiak29-Sep-09 4:01
mveDave Kreskowiak29-Sep-09 4:01 
Questionhow to access the outlook mail from C#? Pin
MahaKh28-Sep-09 19:23
MahaKh28-Sep-09 19:23 
AnswerRe: how to access the outlook mail from C#? Pin
Christian Graus28-Sep-09 19:49
protectorChristian Graus28-Sep-09 19:49 
AnswerRe: how to access the outlook mail from C#? Pin
Abhijit Jana28-Sep-09 20:41
professionalAbhijit Jana28-Sep-09 20:41 
Questionincrement [modified] Pin
_Q12_28-Sep-09 11:44
_Q12_28-Sep-09 11:44 
AnswerRe: increment Pin
Henry Minute28-Sep-09 12:31
Henry Minute28-Sep-09 12:31 
GeneralRe: increment [modified] Pin
_Q12_28-Sep-09 22:04
_Q12_28-Sep-09 22:04 
GeneralRe: increment Pin
Henry Minute29-Sep-09 0:00
Henry Minute29-Sep-09 0:00 
I am pleased that you spotted my deliberate mistake. Laugh | :laugh: Laugh | :laugh:

Here is a new attempt, I think this works OK this time, although it is a bit of a kludge.
int lastValue = 0;
private void numericUpDown1_ValueChanged(object sender, EventArgs e)
{
    if (this.numericUpDown1.Value < 10)
    {
        this.numericUpDown1.Increment = 1;
    }
    else
    {
        this.numericUpDown1.Increment = 10;

        if ((this.numericUpDown1.Value == 10) && (this.lastValue > 10))
        {
            this.numericUpDown1.Increment = 1;
        }
        else if (this.numericUpDown1.Value == 11)
        {
            this.numericUpDown1.Value = 20;
        }
    }
    this.lastValue = (int)this.numericUpDown1.Value;
}


You will notice that the additional checking is now inside the main else block, as it only needs to be done for increments of 10.

My mind is nagging me that there must be a more elegant way to do this, and if I think of one I will get back to you.

Good Luck! Smile | :)

Henry Minute

Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”

GeneralRe: increment Pin
DaveyM6929-Sep-09 0:53
professionalDaveyM6929-Sep-09 0:53 
GeneralRe: increment Pin
Henry Minute29-Sep-09 1:25
Henry Minute29-Sep-09 1:25 
AnswerRe: increment Pin
Luc Pattyn29-Sep-09 1:42
sitebuilderLuc Pattyn29-Sep-09 1:42 

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.