2InVY59
asked on
Barcode Scanner and RS232 commmunication
I have two separate programs that worked just fine one is in VB6 the other is in VB.Net. I get error when I tried to upgrade VB6 to VB.Net. ( Got an error message about MSCOMMX etc...) The first program is in VB6, reads in the barcode scanner data great. (source code can be found at www.freevbcode.com/ShowCode.asp?ID=2408) and the Second part of the code copy to the clipboard (VB.Net).
Public Class frmMain
Inherits System.Windows.Forms.Form
Private Sub btnCopy_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCopy.Click
'This will add the text in the textbox to the clipboard. With
'the value set to false it will clear the clipboard of the data
'added by this program when the program exits.
Clipboard.SetDataObject(tx tSource.Te xt, False)
End Sub
Private Sub btnPaste_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPaste.Click
'We want the data to be in a text format to add in our textbox
txtDest.Text = Clipboard.GetDataObject.Ge tData(Data Formats.Te xt, True)
End Sub
Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub txtSource_TextChanged(ByVa l sender As System.Object, ByVal e As System.EventArgs) Handles txtSource.TextChanged
End Sub
End Class
I want to compare the serial data that comes in from the first program to a list of other data. For example: if the serial data is YES, it will compare "YES", "NO", OR "MAYBE" will be the three choices. When yes is true, then it would print out a phrase, Ex: "You are correct". Then copy to the clipboard "You are correct"
So, my questions are is there a way I can convert VB6 to VB.Net, or VB.Net to Vb6. And is there a simple code to do the above compare function.
Public Class frmMain
Inherits System.Windows.Forms.Form
Private Sub btnCopy_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCopy.Click
'This will add the text in the textbox to the clipboard. With
'the value set to false it will clear the clipboard of the data
'added by this program when the program exits.
Clipboard.SetDataObject(tx
End Sub
Private Sub btnPaste_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPaste.Click
'We want the data to be in a text format to add in our textbox
txtDest.Text = Clipboard.GetDataObject.Ge
End Sub
Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub txtSource_TextChanged(ByVa
End Sub
End Class
I want to compare the serial data that comes in from the first program to a list of other data. For example: if the serial data is YES, it will compare "YES", "NO", OR "MAYBE" will be the three choices. When yes is true, then it would print out a phrase, Ex: "You are correct". Then copy to the clipboard "You are correct"
So, my questions are is there a way I can convert VB6 to VB.Net, or VB.Net to Vb6. And is there a simple code to do the above compare function.
What was the exact error message?
ASKER
Exception occured: Could not load referenced component: MSCOMM32.OCX (1.1.0)
Is it register on that machine?
ASKER
I don't have VB.6. Do I need it? And which softwarewhould be easier to write the compare function, and how.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.