chuckjessup 0 Newbie Poster

ok I have imported a working code from vb 6.0 and it said that the form1.print function couldnt be converted... i am absolutely new at this .net stuff, and desperately need help... the code is below:

Private Sub Command1_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command1.Click
        On Error GoTo printer_err
        'On Error Resume Next
        'Printer.RichTextBox1Print
        ' If Form1.Caption = "Drawer Count: Edit Mode" Then
        '     MsgBox "You are still in edit mode, you will not be able to print untill you exit this mode"
        '     Printer.AbortPrint
        ' End If
        Me.PrintPreviewDialog1 = Me.PrintDocument1
        Kill((My.Application.Info.DirectoryPath & "\count.stcc"))
        'Print(Me, PowerPacks.Printing.PrintForm.PrintOption.Scrollable))
        MsgBox("you should be printing now.... but .NET sucks ---")
        Exit Sub
printer_err:
        Dim m, whattodo As String
        m = "A printer error has occured:"
        Select Case Err.Number
            Case 53
                m = m & " The file nessisary to print is missing."
            Case 68
                m = m & " The printer was not ready or couldn't be found, check connections, and make sure that the printer has power."
            Case 76
                m = m & " The file path is incorrect, please reinstall the latest edition or contact us to resolve the issue."
            Case 482
                m = m & " The printer is not found or is off, or the computer that it is shared on is off. Please check that the power is on to these devices."
            Case Else
                m = m & " " & Err.Number & " '" & Err.Description & "' has occured, please contect us for resolution."
        End Select
        m = m & vbCrLf & vbCrLf & "Press yes to contenue, no to attempt an auto fix, and cancel to end the program"
        whattodo = CStr(MsgBox(m, MsgBoxStyle.Critical + MsgBoxStyle.YesNoCancel, "Printer Error Has Occured"))
        If whattodo = CStr(MsgBoxResult.Yes) Then
            Resume
        ElseIf whattodo = CStr(MsgBoxResult.No) Then
            Command2_Click(Command2, New System.EventArgs())
            MsgBox("Autofix complete, Retring to print.")
            Command1_Click(Command1, New System.EventArgs())
        ElseIf whattodo = CStr(MsgBoxResult.Cancel) Then
            Me.Close()
        End If

    End Sub

and then this is the code from the menu button to basically press command 1...

Public Sub Print_Renamed_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Print_Renamed.Click
		Dim Index As Short = Print_Renamed.GetIndex(eventSender)
		If Frame1.Enabled = True Then
			Command1.Enabled = False
		ElseIf Frame2.Enabled = True Then 
			Command1.Enabled = False
		End If
		If Frame1.Enabled = False Then
			If Frame2.Enabled = False Then
				Command1.Enabled = True
			End If
		End If
		MsgBox("To properly print the revinue report place the count face up in your printer, then print the revinue report from Atrex following the prompts to select  the correct printer to print.", MsgBoxStyle.Information, "Printing Explination")
		Command1_Click(Command1, New System.EventArgs())
	End Sub

now i have installed the vb power packs 2.0 and 3.0 and neither have worked... its a bit frustrating but hey... what ever...

thanks for any input any one give me...

Jesse Fender