There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen boot bsod computer connection crash css dell drive driver drivers email error ethernet excel explorer firefox firefox 3 freeze game hard drive internet internet explorer itunes laptop malware monitor network networking outlook outlook 2003 outlook express partition password printer problem problems ram router slow sound sprtcmd.exe trojan usb virus vista windows windows xp wireless
Software Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
Help converting VB6 code to VB 2005


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
Glitchy81's Avatar
Computer Specs
Member with 74 posts.
 
Join Date: Sep 2007
05-Oct-2007, 04:53 PM #1
Help converting VB6 code to VB.Net
Well, I'm making a web browser in VB and most of it does not work right, so can someone convert the code I have to match up what it is in VB2005 (Is it called VB.Net?).

Code:
  Private Sub tbToolBar_ButtonClick(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Back.Click, Forward.Click, _tbToolBar_Button3.Click, _tbToolBar_Button4.Click, _tbToolBar_Button5.Click, _tbToolBar_Button6.Click
        Dim Button As System.Windows.Forms.ToolStripItem = CType(eventSender, System.Windows.Forms.ToolStripItem)
        On Error Resume Next


        timTimer.Enabled = True


        Select Case Button.Name
            Case "Back"
                brwWebBrowser.GoBack()
            Case "Forward"
                brwWebBrowser.GoForward()
            Case "Refresh"
                brwWebBrowser.Refresh()
            Case "Home"
                brwWebBrowser.GoHome()
            Case "Search"
                brwWebBrowser.GoSearch()
            Case "Stop"
                timTimer.Enabled = False
                brwWebBrowser.Stop()
                Me.Text = brwWebBrowser.DocumentTitle
        End Select

    End Sub
Above is the navigation. Forward and Back work, but the rest don't.

Code:
Private Sub cboAddress_KeyPress(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.KeyPressEventArgs)
        Dim KeyAscii As Short = Asc(eventArgs.KeyChar)
        On Error Resume Next
        If KeyAscii = System.Windows.Forms.Keys.Enter Then
            cboAddress_SelectedIndexChanged(cboAddress, New System.EventArgs())
        End If
        eventArgs.KeyChar = Chr(KeyAscii)
        If KeyAscii = 0 Then
            eventArgs.Handled = True
        End If
    End Sub
Above is a small code that when you press "Enter" it is supposed to go to the specified URL. I tried fixing it but I couldn't get it.

I will appreciate it if anyone could help me.

Last edited by Glitchy81 : 06-Oct-2007 10:39 AM.
Glitchy81's Avatar
Computer Specs
Member with 74 posts.
 
Join Date: Sep 2007
06-Oct-2007, 10:40 AM #2
Can anyone help me?
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 07:19 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.