I have a lengthy project of converting VB6 code to VB.NET.  This is the beginning of the code.  I can't figure out how to change the val(mid$( to VB.NET and the Line Input # doesn't seem to have a direct translation to VB.NET either.  I am trying to learn how to go about the conversion to ensure functionality.  The first module is about 700 lines of text and the second graphical is over 2000.  There are many Private Sub's like the cmdlist_click() that I don't understand how to convert over with all of the true and false statements.  I have worked with code in excel VBA but VB.Net is very different.  Thank you for your time.  
	
	
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
	
		
			
		
		
	
				
			
			
				VB.NET:
			
		
		
		Option Explicit
Dim Sens(75) As Double
Public LnSlope As Double, UFile As String, DFile As String, ProjInfo As String, RutBarWidth As String
Public retval As String, UpLine As String, UStation As Long, ISta As Double, StaCnt As Integer
Public MSta As Double, FSta As String, StrSta As String, Roll As Double, I As Integer, holdval As Double
Public DStation As Long, SensArray As Integer, MaxSens As Double, Sta As Integer, FlipSect As Boolean
Public Sta_Suffix As String, Sta_Prefix As String, Sta_str As String, UpChainCrown As Double, TempSens As Double
Public DnChainCrown As Double, CrownDelta As Double, myfile As String, oldpath As String, cpath As String
Public TruckLane As Boolean
Private Declare Function OSWinHelp% Lib "user32" Alias "WinHelpA" (ByVal hwnd&, ByVal HelpFile$, ByVal wCommand%, dwData As Any)
Private Sub cmdCurrentJob_Click()
'need to evaluate which unit system was used on previous job
 Open "c:\temp\asap\shim.txt" For Input As #1
 Line Input #1, ProjInfo
 RutBarWidth = Val(Mid$(ProjInfo, 40, 4))
 Close #1
 If RutBarWidth < 3000 Then
  MsgBox ("Previously loaded project was Imperial")
  Unload frmMain
  frmShim_Imp.Show
 Else
  MsgBox ("Previously loaded project was Metric")
  Unload frmMain
  frmShim_Met.Show
 End If
  
End Sub
Private Sub cmdList_Click()
    frmMain.Height = 4705
    drvList = "c:\"
    dirList = "c:\temp\asap\raw"
    filList = "*.raw"
    Frame3.Visible = True
    cmdCopy.Visible = False
    cmdProcess.Visible = False
    cmdList.Visible = False
    Picture2.Visible = True
    cmdSelUp.Visible = True
    cmdSelDn.Visible = True
    opImperial.Value = True
End Sub 
	 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		