Click here to Skip to main content
16,006,452 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralClean up unused Icons in system tray Pin
yuancn8-Apr-05 7:42
yuancn8-Apr-05 7:42 
GeneralRe: Clean up unused Icons in system tray Pin
Anonymous8-Apr-05 9:18
Anonymous8-Apr-05 9:18 
GeneralWho's a begginer, cause i am. Pin
SWillard8-Apr-05 5:51
SWillard8-Apr-05 5:51 
GeneralRe: Who's a begginer, cause i am. Pin
Daniel Turini8-Apr-05 6:11
Daniel Turini8-Apr-05 6:11 
GeneralRe: Who's a begginer, cause i am. Pin
GizzoF8-Apr-05 6:14
GizzoF8-Apr-05 6:14 
GeneralRe: Who's a begginer, cause i am. Pin
vertig07308-Apr-05 6:15
vertig07308-Apr-05 6:15 
GeneralRe: Who's a begginer, cause i am. Pin
Daniel Turini8-Apr-05 6:23
Daniel Turini8-Apr-05 6:23 
GeneralRe: Who's a begginer, cause i am. Pin
rwestgraham8-Apr-05 12:37
rwestgraham8-Apr-05 12:37 
Daniel Turini wrote:
Explain me the difference between "On Error GoTo 0" and "On Error GoTo -1", with your words, without quoting MSDN.

In VB6 :

On Error GoTo 0 disables any error handler in the function the GoTo 0 statement appears in. Since the error will not be trapped in the function it will be propagated up the call stack.

On Error GoTo -1 is not a valid statement because -1 is not a valid line number and is also not a valid name for an error handler section.

The VB6 compiler will not complain about an On Error GoTo -1 statement. It simply will not do anything.

In VB.NET it is the same as VB6:

On Error GoTo 0 disables any error handler in the function the GoTo 0 statement appears in. Since the error will not be trapped in the function it will be propagated up the call stack.

On Error GoTo -1: The MSDN says this "sets the enabled exception to Nothing" but if you test in code, like in VB6 On Error GoTo -1 does absolutely nothing.

The better question would be:

"What difference does On Eror GoTo -1 make in the first place because why are you using unstructured error handling in VB.NET?"
GeneralRe: Who's a begginer, cause i am. Pin
Mitch F.8-Apr-05 10:51
Mitch F.8-Apr-05 10:51 
GeneralRe: Who's a begginer, cause i am. Pin
Mitch F.8-Apr-05 10:54
Mitch F.8-Apr-05 10:54 
GeneralRe: Who's a begginer, cause i am. Pin
jtart210-Apr-05 12:32
jtart210-Apr-05 12:32 
Generalvb concept Pin
feeha8-Apr-05 4:55
feeha8-Apr-05 4:55 
GeneralRe: vb concept Pin
vertig07308-Apr-05 5:30
vertig07308-Apr-05 5:30 
GeneralRe: vb concept Pin
GizzoF8-Apr-05 5:40
GizzoF8-Apr-05 5:40 
GeneralWindows Service Pin
H@is@here8-Apr-05 4:41
H@is@here8-Apr-05 4:41 
GeneralRe: Windows Service Pin
Dave Kreskowiak8-Apr-05 4:51
mveDave Kreskowiak8-Apr-05 4:51 
GeneralRe: Windows Service Pin
H@is@here8-Apr-05 5:24
H@is@here8-Apr-05 5:24 
GeneralRe: Windows Service Pin
Dave Kreskowiak8-Apr-05 8:53
mveDave Kreskowiak8-Apr-05 8:53 
GeneralRe: Windows Service Pin
H@is@here8-Apr-05 10:55
H@is@here8-Apr-05 10:55 
GeneralDeleting a row in a datatable Pin
Martin@captivasystems8-Apr-05 4:19
Martin@captivasystems8-Apr-05 4:19 
GeneralRe: Deleting a row in a datatable Pin
vertig07308-Apr-05 4:30
vertig07308-Apr-05 4:30 
GeneralRe: Deleting a row in a datatable Pin
vertig07308-Apr-05 4:31
vertig07308-Apr-05 4:31 
GeneralRe: Deleting a row in a datatable Pin
Martin@captivasystems8-Apr-05 5:30
Martin@captivasystems8-Apr-05 5:30 
GeneralRe: Deleting a row in a datatable Pin
Guillermo Rivero8-Apr-05 6:00
Guillermo Rivero8-Apr-05 6:00 
GeneralRe: Deleting a row in a datatable Pin
Martin@captivasystems8-Apr-05 8:30
Martin@captivasystems8-Apr-05 8:30 

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.