Click here to Skip to main content
15,887,083 members
Home / Discussions / C#
   

C#

 
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 
QuestionLinking 3 tables to 1 form [modified] Pin
Daniel.J.A28-Sep-09 10:53
Daniel.J.A28-Sep-09 10:53 
AnswerRe: Linking 3 tables to 1 form Pin
Henry Minute28-Sep-09 12:03
Henry Minute28-Sep-09 12:03 
GeneralRe: Linking 3 tables to 1 form Pin
Daniel.J.A28-Sep-09 12:14
Daniel.J.A28-Sep-09 12:14 
GeneralRe: Linking 3 tables to 1 form Pin
Henry Minute28-Sep-09 12:25
Henry Minute28-Sep-09 12:25 
Questionhow to mark some rows in datagrid ? Pin
E_Gold28-Sep-09 9:37
E_Gold28-Sep-09 9:37 
AnswerRe: how to mark some rows in datagrid ? Pin
Henry Minute28-Sep-09 10:17
Henry Minute28-Sep-09 10:17 
QuestionDoes anyone know of an recommending tool... Pin
Paw Jershauge28-Sep-09 8:31
Paw Jershauge28-Sep-09 8:31 
AnswerRe: Does anyone know of an recommending tool... Pin
Henry Minute28-Sep-09 9:20
Henry Minute28-Sep-09 9:20 
GeneralRe: Does anyone know of an recommending tool... Pin
Paw Jershauge28-Sep-09 22:01
Paw Jershauge28-Sep-09 22:01 
QuestionMarshaling between managed and unmanaged [modified] Pin
akhanal28-Sep-09 6:47
akhanal28-Sep-09 6:47 
AnswerRe: Marshaling between managed and unmanaged Pin
Luc Pattyn28-Sep-09 7:45
sitebuilderLuc Pattyn28-Sep-09 7:45 
GeneralRe: Marshaling between managed and unmanaged Pin
akhanal28-Sep-09 8:28
akhanal28-Sep-09 8:28 
GeneralRe: Marshaling between managed and unmanaged Pin
Luc Pattyn28-Sep-09 8:48
sitebuilderLuc Pattyn28-Sep-09 8:48 
GeneralRe: Marshaling between managed and unmanaged Pin
Richard MacCutchan28-Sep-09 9:16
mveRichard MacCutchan28-Sep-09 9:16 

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.