Click here to Skip to main content
15,892,480 members
Home / Discussions / C#
   

C#

 
GeneralRe: Simple calculator Pin
DaveyM6913-Feb-11 2:48
professionalDaveyM6913-Feb-11 2:48 
AnswerRe: Simple calculator Pin
Luc Pattyn13-Feb-11 3:01
sitebuilderLuc Pattyn13-Feb-11 3:01 
GeneralRe: Simple calculator [modified] Pin
nstk14-Feb-11 10:21
nstk14-Feb-11 10:21 
AnswerRe: Simple calculator Pin
RichardGrimmer15-Feb-11 3:58
RichardGrimmer15-Feb-11 3:58 
Questionerror in timer function Pin
aeman12-Feb-11 4:40
aeman12-Feb-11 4:40 
AnswerRe: error in timer function Pin
Manfred Rudolf Bihy12-Feb-11 5:10
professionalManfred Rudolf Bihy12-Feb-11 5:10 
GeneralRe: error in timer function Pin
aeman12-Feb-11 6:25
aeman12-Feb-11 6:25 
AnswerRe: error in timer function Pin
OriginalGriff12-Feb-11 5:20
mveOriginalGriff12-Feb-11 5:20 
There are a few problems here:
First, the one you are telling us about: Remove the function at the bottom of your class.
There is already a Main function defined in Program.cs - leave it there and get rid of the one you added.

Secondly, you need a new keyword or two:
greentimer = new System.Timers.Timer(3000);
...
redtimer = new System.Timers.Timer(3000);
I would also change the intervals so they weren't the same: otherwise you won't see one colour at all! Try 3000 and 5000 instead.

And just to be picky, you don't need the invoke, but you do need another close parenthesis...
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.

Digital man: "You are, in short, an idiot with the IQ of an ant and the intellectual capacity of a hose pipe."

GeneralRe: error in timer function Pin
aeman12-Feb-11 20:07
aeman12-Feb-11 20:07 
AnswerRe: error in timer function Pin
OriginalGriff12-Feb-11 21:34
mveOriginalGriff12-Feb-11 21:34 
AnswerRe: error in timer function Pin
Henry Minute12-Feb-11 6:07
Henry Minute12-Feb-11 6:07 
AnswerRe: error in timer function Pin
Luc Pattyn12-Feb-11 6:14
sitebuilderLuc Pattyn12-Feb-11 6:14 
GeneralRe: error in timer function Pin
Henry Minute12-Feb-11 6:34
Henry Minute12-Feb-11 6:34 
GeneralRe: error in timer function Pin
Luc Pattyn12-Feb-11 6:42
sitebuilderLuc Pattyn12-Feb-11 6:42 
AnswerRe: error in timer function Pin
_Erik_14-Feb-11 3:42
_Erik_14-Feb-11 3:42 
Questioncapture finger print continuously Pin
s_akram12-Feb-11 3:12
s_akram12-Feb-11 3:12 
AnswerRe: capture finger print continuously Pin
Henry Minute12-Feb-11 3:20
Henry Minute12-Feb-11 3:20 
Questioncapture finger print continuously Pin
s_akram12-Feb-11 3:09
s_akram12-Feb-11 3:09 
AnswerRe: capture finger print continuously Pin
Dave Kreskowiak12-Feb-11 3:56
mveDave Kreskowiak12-Feb-11 3:56 
QuestionCould not load file or assembly or one of its dependencies. The given assembly name or codebase was invalid. exception from HRESULT Pin
Marat Beiner12-Feb-11 2:34
Marat Beiner12-Feb-11 2:34 
AnswerRe: Could not load file or assembly or one of its dependencies. The given assembly name or codebase was invalid. exception from HRESULT Pin
Henry Minute12-Feb-11 3:21
Henry Minute12-Feb-11 3:21 
GeneralRe: Could not load file or assembly or one of its dependencies. The given assembly name or codebase was invalid. exception from HRESULT Pin
Marat Beiner12-Feb-11 6:20
Marat Beiner12-Feb-11 6:20 
GeneralRe: Could not load file or assembly or one of its dependencies. The given assembly name or codebase was invalid. exception from HRESULT Pin
Henry Minute12-Feb-11 6:32
Henry Minute12-Feb-11 6:32 
GeneralRe: Could not load file or assembly or one of its dependencies. The given assembly name or codebase was invalid. exception from HRESULT [modified] Pin
Marat Beiner12-Feb-11 8:32
Marat Beiner12-Feb-11 8:32 
GeneralRe: Could not load file or assembly or one of its dependencies. The given assembly name or codebase was invalid. exception from HRESULT Pin
Henry Minute12-Feb-11 8:58
Henry Minute12-Feb-11 8:58 

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.