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

translating code from classic vb to vb.net

P: n/a
Hi EveryBody:

Can Some body help me translating the following code from classic Vb to Vb.Net

Option Explicit

Private Sub Command1_Click()

On Error GoTo command_error

With Label1
.Caption = ""
.AutoSize = True
.LinkTopic = "IExplore|WWW_GetWindowInfo"
.LinkItem = "0xffffffff"
.LinkMode = 2
.LinkRequest
End With

DoEvents

With Label2
.Caption = ""
.AutoSize = True
.LinkTopic = "Netscape|WWW_GetWindowInfo"
.LinkItem = "0xffffffff"
.LinkMode = 2
.LinkRequest
End With

Exit Sub

command_error:

'try the next step on error
Resume Next

End Sub

Any help will be appreciated

regard's

Husam
Sep 21 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Husam" <Hu***@discussions.microsoft.comschrieb
Hi EveryBody:

Can Some body help me translating the following code from classic Vb to
Vb.Net

Option Explicit

Private Sub Command1_Click()

On Error GoTo command_error

With Label1
.Caption = ""
.AutoSize = True
.LinkTopic = "IExplore|WWW_GetWindowInfo"
.LinkItem = "0xffffffff"
.LinkMode = 2
.LinkRequest
End With

DoEvents

With Label2
.Caption = ""
.AutoSize = True
.LinkTopic = "Netscape|WWW_GetWindowInfo"
.LinkItem = "0xffffffff"
.LinkMode = 2
.LinkRequest
End With

Exit Sub

command_error:

'try the next step on error
Resume Next

End Sub
As this is equal to "On error resume next" in this case, you can have a look
at the thread "Resuming from an error" dealing with the same problem.

http://groups.google.com/group/micro...141f21adaf7adf

Though, I wonder why you want to ignore all errors.

BTW, DoEvents (now Application.DoEvents) is usually not required at all, and
it was often misused in VB6.

Armin

Sep 21 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.