By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,033 Members | 1,285 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,033 IT Pros & Developers. It's quick & easy.

Why Does VS Remove My Parens, i.e. Timer() -> Timer

P: n/a
My VB.Net app will require a timer of some sort. So I did some
research and decided to use System.Windows.Forms.Timer, I guess mainly
because while I have practically no experience with Events, I have
absolutely no experience will CallBacks.

The only example I've been able to find for this control is in the
Petzold book. It uses the following line of code to instantiate the
timer ...

Dim tmr As New Timer()

But when I enter that line of code, as soon as I move the cursor to
the next line the ()s disappear! I do have an Imports statement for
System.Windows.Forms.Timer.

I suppose I am doing something dumb (I am really new to this stuff)
but I can't imagine what.

I'll appreciate any help or pointers.

Bob
Nov 21 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
People were getting confused between that and array delcarations...

In 2002/1.0 you could do that..

2003/1.1 feature removed.
"eBob.com" <eB******@totallyfakeisp.com> wrote in message
news:6p********************************@4ax.com...
My VB.Net app will require a timer of some sort. So I did some
research and decided to use System.Windows.Forms.Timer, I guess mainly
because while I have practically no experience with Events, I have
absolutely no experience will CallBacks.

The only example I've been able to find for this control is in the
Petzold book. It uses the following line of code to instantiate the
timer ...

Dim tmr As New Timer()

But when I enter that line of code, as soon as I move the cursor to
the next line the ()s disappear! I do have an Imports statement for
System.Windows.Forms.Timer.

I suppose I am doing something dumb (I am really new to this stuff)
but I can't imagine what.

I'll appreciate any help or pointers.

Bob

Nov 21 '05 #2

P: n/a
Ebob,

When you are busy with timers, watch that there are 4 timers,
windows.forms.form.timer
windows.system.timer
threading.thread.timer
and one in the Microsoft.visualbasic namespace.

This can confuse very much because in the documentation it is seldom told.
When you have simple single threading operations within one form I advice
you to take the first.

http://msdn.microsoft.com/library/de...classtopic.asp

A sample is in this document.

I hope this helps?

Cor
Nov 21 '05 #3

P: n/a
"CJ Taylor" <cege [ahh ttt] tavayn wooohooo hooo ohhh com> schrieb:
People were getting confused between that and array delcarations...

In 2002/1.0 you could do that..

2003/1.1 feature removed.


In VB 2005's IDE support, AFAIR the '()' will be kept on ctor calls.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #4

P: n/a
Does that mean in 2007 it will be removed again? =)
"Herfried K. Wagner [MVP]" <hi*******@m.activevb.de> wrote in message
news:%2*****************@TK2MSFTNGP14.phx.gbl...
"CJ Taylor" <cege [ahh ttt] tavayn wooohooo hooo ohhh com> schrieb:
People were getting confused between that and array delcarations...

In 2002/1.0 you could do that..

2003/1.1 feature removed.


In VB 2005's IDE support, AFAIR the '()' will be kept on ctor calls.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #5

P: n/a
Thanks CJ and Herfried.

On Fri, 1 Oct 2004 16:04:18 +0200, "Herfried K. Wagner [MVP]"
<hi*******@m.activevb.de> wrote:
"CJ Taylor" <cege [ahh ttt] tavayn wooohooo hooo ohhh com> schrieb:
People were getting confused between that and array delcarations...

In 2002/1.0 you could do that..

2003/1.1 feature removed.


In VB 2005's IDE support, AFAIR the '()' will be kept on ctor calls.


Nov 21 '05 #6

P: n/a
"CJ Taylor" <[cege] at [tavayn] dit commmmm> schrieb:
Does that mean in 2007 it will be removed again? =)


I would prefer a checkbox in the code formatting rules settings:

[_] Remove '()' on constructor calls

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.