Re: Timer not working in thread



<sony.m.2007@xxxxxxxxxxxxxx> wrote:

<snip>

when I tried
this.Invoke((MethodInvoker) delegate {timer1.Enabled =
false;label1.visible =false});
I'm getting copiler errors
1. A namespace does not directly contain members such as fields or
methods
2.Invalid expression term ')'
3.Invalid expression term 'delegate'
4.Invalid token '=' in class, struct, or interface member declaration
5.Type expected
6.Type or namespace definition, or end-of-file expected

Well for a start you'd need an extra semi-colon after
label1.visible=false (as well as making it use real properties -
*please* start posting the actual code).

Then there's the question of whether you're using C# 3 to start with...

--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
.



Relevant Pages

  • Re: Burkes International REegister of Arms
    ... The senior line does not demand any fee; aside from 100 euros to cover the ... The junior line Order does require its members ... charity and has not published accounts detailing how these funds ... The Delegate of this Order in 2004 on an Irish radio programme ...
    (rec.heraldry)
  • Re: Attack a sacred Python Cow
    ... metaphorically 'contain' their members. ... namespace of the module in which they are defined. ... My memory on this is a bit fuzzy, but IFIRC Ada 95 did not support ... so many people demanded the "dot" notation that it was finally ...
    (comp.lang.python)
  • Re: Delegation of groups admin. - restricted to a subset of objects
    ... "only add a certain set of computers as members to a set of groups" ... computers to that group, and add this applications groups to the main ... We are now creating application groups where workstations are to be ... We want to delegate administration of the application groups (to ...
    (microsoft.public.windows.server.active_directory)
  • Re: Hypothetical: All code in classes but main()
    ... > all data members, if it needs to access private and protected instance ... > the use of public data members in good OO design. ... > namespace math in a namespace top? ...
    (comp.lang.cpp)
  • Re: Delphi at all - Re: height:=PaintBox1.Height; magically changes the size of the form?
    ... When I raise the visibility of class members, from "private" to "protected", the now visible members can result in references to the ... I understand that some people want to read source code offline, but I prefer the hyperlink navigation to the declarations, and back again, as provided by the Delphi IDE. ... Even if I agree, that a requirement for fully qualified names will remove any doubts about their declarations, such code can become almost unreadable, due to the bloat with the qualifiers. ... And a qualification with namespaces is useless, when nobody can know, in which *module* a member of an namespace is declared. ...
    (comp.lang.pascal.delphi.misc)

Loading