473,399 Members | 2,478 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

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

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
6 1505
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
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
"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
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
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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: farseer | last post by:
Hi, does anyone out there use Eclipse 3.0.1 as their Java Editor? >From menu "Window->Preferences->Java->Code Style->Code Formatter", i created a new Code Formatter profile and set it up how i...
12
by: Stephen Ferg | last post by:
I've just spent several very frustrating hours tracking down a bug in one of my programs. The problem was that I was writing text to a file, and when I was done I coded f.close when I should...
8
by: felciano | last post by:
Hi -- I am trying to use the csv module to parse a column of values containing comma-delimited values with unusual escaping: AAA, BBB, CCC (some text, right here), DDD I want this to come...
70
by: Roy Yao | last post by:
Does it mean "(sizeof(int))* (p)" or "sizeof( (int)(*p) )" ? According to my analysis, operator sizeof, (type) and * have the same precedence, and they combine from right to left. Then this...
18
by: Daniel Billingsley | last post by:
Or seem to anyway. ===== string abc; if ((abc=getString()) != "") { MessageBox.Show(abc); } private string getString() {
2
by: tibirna | last post by:
Hello mem_fun_ref(&(std::list<int>::size)) is compiled as valid by gcc 3.3.4 and causes an error ("defined-id needed") with gcc 4.0.2. The later requires mem_fun_ref(&std::list<int>::size)...
23
by: centurian | last post by:
I have compiled following program with g++/gcc 3.3.1 and "MS Visual C++ 6" and it ran without any errors. Does this thing make any sense? Is it of some use or some problem with grammar/CFG of...
25
by: John A Grandy | last post by:
In .NET v1.1.4322 , in a VS.NET application , has anyone ever run into the bizarre situation where at runtime .NET believes that the ToString() method does not exist ... Sometimes this problem...
2
by: Terry Olsen | last post by:
I have an SQL database with rows that have parens in the data. If I run a select statement such as: SELECT SongName FROM Songs WHERE SongName = 'John Jacob (Jingleheimer Schmidt)' It...
3
by: Peter Michaux | last post by:
Hi, In the following string I would like to find the word that comes after "test" as long as test is not inside parenthesis. In this example the match would be "two". "the (test one) test...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.