hi, i bought a Programmable Message Board kit, this kit connects to the computer and i can send from the computer massages to the kit LCD screen.
I got an sample file, that comes with that kit.
My problem is that this sample file are an old Visual Basic 6 project file, i tried to upgrade it to VB 2008 (Using the Upgrade wizard), its worked, but still there are some errors which i cannot solve :( (I'm just a beginner in VB.net).

Somebody can help me with this file?
Here is the code of the sample, that i tried to upgrade:

Option Strict Off
Option Explicit On
Imports VB = Microsoft.VisualBasic
Friend Class text_to_RS232
	Inherits System.Windows.Forms.Form
	Dim flag As Boolean 'flag = false : send ID, flag = true : send data
	Dim ID As String 'will contain ID address
	Dim messagestring As String 'will contain all messages to transmit
	Dim charcounter As Short 'will keep track of the position in messagestring
	
	Dim inputtrigger(10) As String 'will keep track of trigger status (1 or 0)
	Dim message(10) As String 'will keep track of message content
	Dim inputnumber(10) As String 'will keep track of input #
	Dim port As String 'keeps serial port #
	Dim trigger(10) As Boolean
	
	
	
	
	
	
	
	'UPGRADE_WARNING: Event Combo1.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	'UPGRADE_WARNING: ComboBox event Combo1.Change was upgraded to Combo1.TextChanged which has a new behavior. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="DFCDE711-9694-47D7-9C50-45A99CD8E91E"'
	Private Sub Combo1_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Combo1.TextChanged
		Dim None As Object
		If comm.PortOpen = True Then comm.PortOpen = False
		port = Combo1.Text
		comm.CommPort = Val(Combo1.Text)
		'UPGRADE_WARNING: Couldn't resolve default property of object None. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
		comm.Handshaking = None
		comm.Settings = "2400,N,8,1"
		comm.OutBufferSize = 4096
		comm.InputLen = 0
		comm.RThreshold = 1
		comm.SThreshold = 1
		comm.PortOpen = True
	End Sub
	
	'UPGRADE_WARNING: Event Combo1.SelectedIndexChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub Combo1_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Combo1.SelectedIndexChanged
		Dim None As Object
		If comm.PortOpen = True Then comm.PortOpen = False
		port = Combo1.Text
		comm.CommPort = Val(Combo1.Text)
		'UPGRADE_WARNING: Couldn't resolve default property of object None. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
		comm.Handshaking = None
		comm.Settings = "2400,N,8,1"
		comm.OutBufferSize = 4096
		comm.InputLen = 0
		comm.RThreshold = 1
		comm.SThreshold = 1
		comm.PortOpen = True
	End Sub
	
	
	
	
	
	'UPGRADE_WARNING: Event Combo2.SelectedIndexChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub Combo2_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Combo2.SelectedIndexChanged
		ID = Combo2.Text
		
	End Sub
	
	Private Sub Command1_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command1.Click 'cursor home
		flag = False
		Me.Cursor = System.Windows.Forms.Cursors.WaitCursor
		messagestring = Chr(8)
		charcounter = 1
		Timer1.Enabled = True
	End Sub
	
	Private Sub Command2_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command2.Click 'send to LCD
		flag = False
		Me.Cursor = System.Windows.Forms.Cursors.WaitCursor
		
		messagestring = Text1.Text
		charcounter = 1
		Timer1.Enabled = True
	End Sub
	
	Private Sub Command3_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command3.Click 'clear LCD
		flag = False
		Me.Cursor = System.Windows.Forms.Cursors.WaitCursor
		messagestring = Chr(13)
		charcounter = 1
		Timer1.Enabled = True
		
		
	End Sub
	
	Private Sub Command4_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command4.Click 'date and time
		flag = False
		Me.Cursor = System.Windows.Forms.Cursors.WaitCursor
		messagestring = Chr(13) & "   " & DateString
		charcounter = 1
		Timer1.Enabled = True
		
	End Sub
	
	Private Sub Command5_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command5.Click 'time
		flag = False
		Me.Cursor = System.Windows.Forms.Cursors.WaitCursor
		messagestring = Chr(13) & "     " & VB.Left(TimeString, 5)
		
		charcounter = 1
		Timer1.Enabled = True
		
	End Sub
	
	Private Sub Command6_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command6.Click 'clear textbox
		Text1.Text = ""
		
	End Sub
	
	Private Sub Command7_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command7.Click
		MsgBox("Make sure K8045 is in 'program mode' (press SW2)")
		flag = False
		Me.Cursor = System.Windows.Forms.Cursors.WaitCursor
		messagestring = "S" & ID & "QQQQQQ" & Chr(13)
		
		
		charcounter = 1
		Timer1.Enabled = True
	End Sub
	
	Private Sub text_to_RS232_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
		Dim t As Object
		flag = False
		
		For t = 0 To 9
			'UPGRADE_WARNING: Couldn't resolve default property of object t. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
			Combo2.Items.Add((Str(t)))
		Next t
		Combo2.Text = VB6.GetItemString(Combo2, 0)
		ID = "0"
		
		
		Timer1.Enabled = False
		
		On Error GoTo no_port
		
		
		comm.CommPort = CShort("1")
		comm.PortOpen = True
		Combo1.Items.Add("1")
		comm.PortOpen = False
		
		comm.CommPort = CShort("2")
		comm.PortOpen = True
		Combo1.Items.Add("2")
		comm.PortOpen = False
		
		comm.CommPort = CShort("3")
		comm.PortOpen = True
		Combo1.Items.Add("3")
		comm.PortOpen = False
		
		comm.CommPort = CShort("4")
		comm.PortOpen = True
		Combo1.Items.Add("4")
		comm.PortOpen = False
		Exit Sub
		
no_port: 
		Combo1.Text = VB6.GetItemString(Combo1, 0)
		
		
		Exit Sub
	End Sub
	
	'UPGRADE_NOTE: Form_Terminate was upgraded to Form_Terminate_Renamed. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="A9E4979A-37FA-4718-9994-97DD76ED70A7"'
	'UPGRADE_WARNING: text_to_RS232 event Form.Terminate has a new behavior. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6BA9B8D2-2A32-4B6E-8D36-44949974A5B4"'
	Private Sub Form_Terminate_Renamed()
		If comm.PortOpen = True Then comm.PortOpen = False
	End Sub
	
	
	
	
	
	
	
	
	
	'UPGRADE_WARNING: Event Text1.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
	Private Sub Text1_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Text1.TextChanged 'tekstbox
		'aaa
	End Sub
	
	Private Sub Timer1_Tick(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Timer1.Tick
		
		If flag = False Then GoTo sendID
		
		comm.Output = Mid(messagestring, charcounter, 1)
		charcounter = charcounter + 1
		If charcounter = Len(messagestring) + 1 Then Timer1.Enabled = False
		flag = False
		If Timer1.Enabled = False Then Me.Cursor = System.Windows.Forms.Cursors.Default
		
		Exit Sub
sendID: 
		comm.Output = ID
		flag = True
		
	End Sub
End Class

The Original File (Visual Basic 6 Version):

Dim flag As Boolean 'flag = false : send ID, flag = true : send data
Dim ID As String 'will contain ID address
Dim messagestring As String 'will contain all messages to transmit
Dim charcounter As Integer  'will keep track of the position in messagestring

Dim inputtrigger(10) As String 'will keep track of trigger status (1 or 0)
Dim message(10) As String   'will keep track of message content
Dim inputnumber(10) As String   'will keep track of input #
Dim port As String  'keeps serial port #
Dim trigger(10) As Boolean







Private Sub Combo1_Change()
If comm.PortOpen = True Then comm.PortOpen = False
port = Combo1.Text
comm.CommPort = Val(Combo1)
comm.Handshaking = None
comm.Settings = "2400,N,8,1"
comm.OutBufferSize = 4096
comm.InputLen = 0
comm.RThreshold = 1
comm.SThreshold = 1
comm.PortOpen = True
End Sub

Private Sub Combo1_Click()
If comm.PortOpen = True Then comm.PortOpen = False
port = Combo1.Text
comm.CommPort = Val(Combo1)
comm.Handshaking = None
comm.Settings = "2400,N,8,1"
comm.OutBufferSize = 4096
comm.InputLen = 0
comm.RThreshold = 1
comm.SThreshold = 1
comm.PortOpen = True
End Sub





Private Sub Combo2_Click()
ID = Combo2.Text

End Sub

Private Sub Command1_Click()    'cursor home
flag = False
text_to_RS232.MousePointer = 11
messagestring = Chr$(8)
charcounter = 1
Timer1.Enabled = True
End Sub

Private Sub Command2_Click()    'send to LCD
flag = False
text_to_RS232.MousePointer = 11

messagestring = Text1.Text
charcounter = 1
Timer1.Enabled = True
End Sub

Private Sub Command3_Click()    'clear LCD
flag = False
text_to_RS232.MousePointer = 11
messagestring = Chr$(13)
charcounter = 1
Timer1.Enabled = True


End Sub

Private Sub Command4_Click()    'date and time
flag = False
text_to_RS232.MousePointer = 11
messagestring = Chr$(13) & "   " & Date$
charcounter = 1
Timer1.Enabled = True

End Sub

Private Sub Command5_Click()    'time
flag = False
text_to_RS232.MousePointer = 11
messagestring = Chr$(13) & "     " & Left$(Time$, 5)

charcounter = 1
Timer1.Enabled = True

End Sub

Private Sub Command6_Click()    'clear textbox
Text1.Text = ""

End Sub

Private Sub Command7_Click()
MsgBox ("Make sure K8045 is in 'program mode' (press SW2)")
flag = False
text_to_RS232.MousePointer = 11
messagestring = "S" & ID & "QQQQQQ" & Chr$(13)


charcounter = 1
Timer1.Enabled = True
End Sub

Private Sub Form_Load()
flag = False

For t = 0 To 9
Combo2.AddItem (Str$(t))
Next t
Combo2.Text = Combo2.List(0)
ID = "0"


Timer1.Enabled = False

On Error GoTo no_port


comm.CommPort = "1"
comm.PortOpen = True
Combo1.AddItem "1"
comm.PortOpen = False

comm.CommPort = "2"
comm.PortOpen = True
Combo1.AddItem "2"
comm.PortOpen = False

comm.CommPort = "3"
comm.PortOpen = True
Combo1.AddItem "3"
comm.PortOpen = False

comm.CommPort = "4"
comm.PortOpen = True
Combo1.AddItem "4"
comm.PortOpen = False
Exit Sub

no_port:
Combo1.Text = Combo1.List(0)


Exit Sub
End Sub

Private Sub Form_Terminate()
If comm.PortOpen = True Then comm.PortOpen = False
End Sub









Private Sub Text1_Change()      'tekstbox
'aaa
End Sub

Private Sub Timer1_Timer()

If flag = False Then GoTo sendID

comm.Output = Mid$(messagestring, charcounter, 1)
charcounter = charcounter + 1
If charcounter = Len(messagestring) + 1 Then Timer1.Enabled = False
flag = False
If Timer1.Enabled = False Then text_to_RS232.MousePointer = 0

Exit Sub
sendID:
comm.Output = ID
flag = True

End Sub

PS: im adding the original files and the converted files.

Thank you, Man1919.

ok, first of all:

change

Private Sub Combo1_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Combo1.TextChanged

to

Private Sub Combo1_SelectedIndexChanged( sender As System.Object,  e As System.EventArgs) Handles Combo1.SelectedIndexChanged

then remove all

Dim None As Object

replace

comm.Handshaking = None

with

comm.Handshake = IO.Ports.Handshake.None

change

Private Sub Form_Terminate_Renamed()

to

Private Sub Form_Terminate_Renamed(sender As Object, e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed

and last
change

Dim t As Object

to

Dim t As integer

Hope i didn't forget something

commented: thx :) +1

ok, first of all:

change

Private Sub Combo1_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Combo1.TextChanged

to

Private Sub Combo1_SelectedIndexChanged( sender As System.Object,  e As System.EventArgs) Handles Combo1.SelectedIndexChanged

then remove all

Dim None As Object

replace

comm.Handshaking = None

with

comm.Handshake = IO.Ports.Handshake.None

change

Private Sub Form_Terminate_Renamed()

to

Private Sub Form_Terminate_Renamed(sender As Object, e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed

and last
change

Dim t As Object

to

Dim t As integer

Hope i didn't forget something

hi, i did what you said, and i got some errors (see attached picture).

i got also errors in the designer file.

here is the designer file content:

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> Partial Class text_to_RS232
#Region "Windows Form Designer generated code "
	<System.Diagnostics.DebuggerNonUserCode()> Public Sub New()
		MyBase.New()
		'This call is required by the Windows Form Designer.
		InitializeComponent()
	End Sub
	'Form overrides dispose to clean up the component list.
	<System.Diagnostics.DebuggerNonUserCode()> Protected Overloads Overrides Sub Dispose(ByVal Disposing As Boolean)
		If Disposing Then
			Static fTerminateCalled As Boolean
			If Not fTerminateCalled Then
				Form_Terminate_renamed()
				fTerminateCalled = True
			End If
			If Not components Is Nothing Then
				components.Dispose()
			End If
		End If
		MyBase.Dispose(Disposing)
	End Sub
	'Required by the Windows Form Designer
	Private components As System.ComponentModel.IContainer
	Public ToolTip1 As System.Windows.Forms.ToolTip
	Public WithEvents Command7 As System.Windows.Forms.Button
	Public WithEvents Command2 As System.Windows.Forms.Button
	Public WithEvents Command6 As System.Windows.Forms.Button
	Public WithEvents Command3 As System.Windows.Forms.Button
	Public WithEvents Combo2 As System.Windows.Forms.ComboBox
	Public WithEvents Combo1 As System.Windows.Forms.ComboBox
	Public WithEvents Command5 As System.Windows.Forms.Button
	Public WithEvents Timer1 As System.Windows.Forms.Timer
	Public WithEvents comm As AxMSCommLib.AxMSComm
	Public WithEvents Command4 As System.Windows.Forms.Button
	Public WithEvents Command1 As System.Windows.Forms.Button
	Public WithEvents Text1 As System.Windows.Forms.TextBox
	Public WithEvents Frame1 As System.Windows.Forms.GroupBox
	Public WithEvents Label2 As System.Windows.Forms.Label
	Public WithEvents Label1 As System.Windows.Forms.Label
	'NOTE: The following procedure is required by the Windows Form Designer
	'It can be modified using the Windows Form Designer.
	'Do not modify it using the code editor.
	<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
		Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(text_to_RS232))
		Me.components = New System.ComponentModel.Container()
		Me.ToolTip1 = New System.Windows.Forms.ToolTip(components)
		Me.Command7 = New System.Windows.Forms.Button
		Me.Command2 = New System.Windows.Forms.Button
		Me.Command6 = New System.Windows.Forms.Button
		Me.Command3 = New System.Windows.Forms.Button
		Me.Combo2 = New System.Windows.Forms.ComboBox
		Me.Combo1 = New System.Windows.Forms.ComboBox
		Me.Command5 = New System.Windows.Forms.Button
		Me.Timer1 = New System.Windows.Forms.Timer(components)
		Me.comm = New AxMSCommLib.AxMSComm
		Me.Command4 = New System.Windows.Forms.Button
		Me.Command1 = New System.Windows.Forms.Button
		Me.Text1 = New System.Windows.Forms.TextBox
		Me.Frame1 = New System.Windows.Forms.GroupBox
		Me.Label2 = New System.Windows.Forms.Label
		Me.Label1 = New System.Windows.Forms.Label
		Me.SuspendLayout()
		Me.ToolTip1.Active = True
		CType(Me.comm, System.ComponentModel.ISupportInitialize).BeginInit()
		Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
		Me.Text = "Send text to K8045 LCD"
		Me.ClientSize = New System.Drawing.Size(453, 216)
		Me.Location = New System.Drawing.Point(3, 22)
		Me.Icon = CType(resources.GetObject("text_to_RS232.Icon"), System.Drawing.Icon)
		Me.MaximizeBox = False
		Me.MinimizeBox = False
		Me.StartPosition = System.Windows.Forms.FormStartPosition.WindowsDefaultLocation
		Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
		Me.BackColor = System.Drawing.SystemColors.Control
		Me.ControlBox = True
		Me.Enabled = True
		Me.KeyPreview = False
		Me.Cursor = System.Windows.Forms.Cursors.Default
		Me.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.ShowInTaskbar = True
		Me.HelpButton = False
		Me.WindowState = System.Windows.Forms.FormWindowState.Normal
		Me.Name = "text_to_RS232"
		Me.Command7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
		Me.Command7.Text = "Change ID"
		Me.Command7.Size = New System.Drawing.Size(89, 25)
		Me.Command7.Location = New System.Drawing.Point(344, 16)
		Me.Command7.TabIndex = 12
		Me.ToolTip1.SetToolTip(Me.Command7, "Sends the current ID to the K8045")
		Me.Command7.BackColor = System.Drawing.SystemColors.Control
		Me.Command7.CausesValidation = True
		Me.Command7.Enabled = True
		Me.Command7.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Command7.Cursor = System.Windows.Forms.Cursors.Default
		Me.Command7.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Command7.TabStop = True
		Me.Command7.Name = "Command7"
		Me.Command2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
		Me.Command2.Text = "Send to LCD"
		Me.Command2.Size = New System.Drawing.Size(89, 25)
		Me.Command2.Location = New System.Drawing.Point(184, 120)
		Me.Command2.TabIndex = 11
		Me.ToolTip1.SetToolTip(Me.Command2, "Send above message to the K8045")
		Me.Command2.BackColor = System.Drawing.SystemColors.Control
		Me.Command2.CausesValidation = True
		Me.Command2.Enabled = True
		Me.Command2.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Command2.Cursor = System.Windows.Forms.Cursors.Default
		Me.Command2.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Command2.TabStop = True
		Me.Command2.Name = "Command2"
		Me.Command6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
		Me.Command6.Text = "Clear"
		Me.Command6.Size = New System.Drawing.Size(89, 25)
		Me.Command6.Location = New System.Drawing.Point(72, 120)
		Me.Command6.TabIndex = 10
		Me.ToolTip1.SetToolTip(Me.Command6, "Clear the above textbox")
		Me.Command6.BackColor = System.Drawing.SystemColors.Control
		Me.Command6.CausesValidation = True
		Me.Command6.Enabled = True
		Me.Command6.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Command6.Cursor = System.Windows.Forms.Cursors.Default
		Me.Command6.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Command6.TabStop = True
		Me.Command6.Name = "Command6"
		Me.Command3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
		Me.Command3.Text = "Clear LCD"
		Me.Command3.Size = New System.Drawing.Size(89, 25)
		Me.Command3.Location = New System.Drawing.Point(344, 56)
		Me.Command3.TabIndex = 9
		Me.ToolTip1.SetToolTip(Me.Command3, "Erases all text and returns the cursor to its home position")
		Me.Command3.BackColor = System.Drawing.SystemColors.Control
		Me.Command3.CausesValidation = True
		Me.Command3.Enabled = True
		Me.Command3.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Command3.Cursor = System.Windows.Forms.Cursors.Default
		Me.Command3.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Command3.TabStop = True
		Me.Command3.Name = "Command3"
		Me.Combo2.Size = New System.Drawing.Size(41, 21)
		Me.Combo2.Location = New System.Drawing.Point(264, 32)
		Me.Combo2.TabIndex = 6
		Me.Combo2.Text = "Combo2"
		Me.ToolTip1.SetToolTip(Me.Combo2, "Choose which K8045 will listen and display text")
		Me.Combo2.BackColor = System.Drawing.SystemColors.Window
		Me.Combo2.CausesValidation = True
		Me.Combo2.Enabled = True
		Me.Combo2.ForeColor = System.Drawing.SystemColors.WindowText
		Me.Combo2.IntegralHeight = True
		Me.Combo2.Cursor = System.Windows.Forms.Cursors.Default
		Me.Combo2.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Combo2.Sorted = False
		Me.Combo2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDown
		Me.Combo2.TabStop = True
		Me.Combo2.Visible = True
		Me.Combo2.Name = "Combo2"
		Me.Combo1.Size = New System.Drawing.Size(41, 21)
		Me.Combo1.Location = New System.Drawing.Point(128, 32)
		Me.Combo1.TabIndex = 5
		Me.Combo1.Text = "Combo1"
		Me.ToolTip1.SetToolTip(Me.Combo1, "Select the serial port")
		Me.Combo1.BackColor = System.Drawing.SystemColors.Window
		Me.Combo1.CausesValidation = True
		Me.Combo1.Enabled = True
		Me.Combo1.ForeColor = System.Drawing.SystemColors.WindowText
		Me.Combo1.IntegralHeight = True
		Me.Combo1.Cursor = System.Windows.Forms.Cursors.Default
		Me.Combo1.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Combo1.Sorted = False
		Me.Combo1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDown
		Me.Combo1.TabStop = True
		Me.Combo1.Visible = True
		Me.Combo1.Name = "Combo1"
		Me.Command5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
		Me.Command5.Text = "Display time"
		Me.Command5.Size = New System.Drawing.Size(89, 25)
		Me.Command5.Location = New System.Drawing.Point(344, 136)
		Me.Command5.TabIndex = 3
		Me.ToolTip1.SetToolTip(Me.Command5, "Displays the current system time")
		Me.Command5.BackColor = System.Drawing.SystemColors.Control
		Me.Command5.CausesValidation = True
		Me.Command5.Enabled = True
		Me.Command5.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Command5.Cursor = System.Windows.Forms.Cursors.Default
		Me.Command5.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Command5.TabStop = True
		Me.Command5.Name = "Command5"
		Me.Timer1.Enabled = False
		Me.Timer1.Interval = 100
		comm.OcxState = CType(resources.GetObject("comm.OcxState"), System.Windows.Forms.AxHost.State)
		Me.comm.Location = New System.Drawing.Point(0, 0)
		Me.comm.Name = "comm"
		Me.Command4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
		Me.Command4.Text = "Display date"
		Me.Command4.Size = New System.Drawing.Size(89, 25)
		Me.Command4.Location = New System.Drawing.Point(344, 176)
		Me.Command4.TabIndex = 2
		Me.ToolTip1.SetToolTip(Me.Command4, "Displays the current system date")
		Me.Command4.BackColor = System.Drawing.SystemColors.Control
		Me.Command4.CausesValidation = True
		Me.Command4.Enabled = True
		Me.Command4.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Command4.Cursor = System.Windows.Forms.Cursors.Default
		Me.Command4.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Command4.TabStop = True
		Me.Command4.Name = "Command4"
		Me.Command1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
		Me.Command1.Text = "Cursor home"
		Me.Command1.Size = New System.Drawing.Size(89, 25)
		Me.Command1.Location = New System.Drawing.Point(344, 96)
		Me.Command1.TabIndex = 1
		Me.ToolTip1.SetToolTip(Me.Command1, "Returns the cursor to the left hand side of the screen, without changing screen content")
		Me.Command1.BackColor = System.Drawing.SystemColors.Control
		Me.Command1.CausesValidation = True
		Me.Command1.Enabled = True
		Me.Command1.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Command1.Cursor = System.Windows.Forms.Cursors.Default
		Me.Command1.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Command1.TabStop = True
		Me.Command1.Name = "Command1"
		Me.Text1.AutoSize = False
		Me.Text1.Font = New System.Drawing.Font("Courier New", 21.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Text1.Size = New System.Drawing.Size(281, 35)
		Me.Text1.Location = New System.Drawing.Point(32, 80)
		Me.Text1.Maxlength = 16
		Me.Text1.TabIndex = 0
		Me.Text1.Text = "your message"
		Me.Text1.AcceptsReturn = True
		Me.Text1.TextAlign = System.Windows.Forms.HorizontalAlignment.Left
		Me.Text1.BackColor = System.Drawing.SystemColors.Window
		Me.Text1.CausesValidation = True
		Me.Text1.Enabled = True
		Me.Text1.ForeColor = System.Drawing.SystemColors.WindowText
		Me.Text1.HideSelection = True
		Me.Text1.ReadOnly = False
		Me.Text1.Cursor = System.Windows.Forms.Cursors.IBeam
		Me.Text1.MultiLine = False
		Me.Text1.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Text1.ScrollBars = System.Windows.Forms.ScrollBars.None
		Me.Text1.TabStop = True
		Me.Text1.Visible = True
		Me.Text1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
		Me.Text1.Name = "Text1"
		Me.Frame1.Size = New System.Drawing.Size(305, 89)
		Me.Frame1.Location = New System.Drawing.Point(16, 64)
		Me.Frame1.TabIndex = 4
		Me.Frame1.BackColor = System.Drawing.SystemColors.Control
		Me.Frame1.Enabled = True
		Me.Frame1.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Frame1.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Frame1.Visible = True
		Me.Frame1.Padding = New System.Windows.Forms.Padding(0)
		Me.Frame1.Name = "Frame1"
		Me.Label2.Text = "Send to"
		Me.Label2.Size = New System.Drawing.Size(49, 17)
		Me.Label2.Location = New System.Drawing.Point(216, 32)
		Me.Label2.TabIndex = 8
		Me.ToolTip1.SetToolTip(Me.Label2, "Choose target K8045")
		Me.Label2.TextAlign = System.Drawing.ContentAlignment.TopLeft
		Me.Label2.BackColor = System.Drawing.SystemColors.Control
		Me.Label2.Enabled = True
		Me.Label2.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Label2.Cursor = System.Windows.Forms.Cursors.Default
		Me.Label2.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Label2.UseMnemonic = True
		Me.Label2.Visible = True
		Me.Label2.AutoSize = False
		Me.Label2.BorderStyle = System.Windows.Forms.BorderStyle.None
		Me.Label2.Name = "Label2"
		Me.Label1.Text = "Choose serial port"
		Me.Label1.Size = New System.Drawing.Size(89, 17)
		Me.Label1.Location = New System.Drawing.Point(32, 32)
		Me.Label1.TabIndex = 7
		Me.Label1.TextAlign = System.Drawing.ContentAlignment.TopLeft
		Me.Label1.BackColor = System.Drawing.SystemColors.Control
		Me.Label1.Enabled = True
		Me.Label1.ForeColor = System.Drawing.SystemColors.ControlText
		Me.Label1.Cursor = System.Windows.Forms.Cursors.Default
		Me.Label1.RightToLeft = System.Windows.Forms.RightToLeft.No
		Me.Label1.UseMnemonic = True
		Me.Label1.Visible = True
		Me.Label1.AutoSize = False
		Me.Label1.BorderStyle = System.Windows.Forms.BorderStyle.None
		Me.Label1.Name = "Label1"
		Me.Controls.Add(Command7)
		Me.Controls.Add(Command2)
		Me.Controls.Add(Command6)
		Me.Controls.Add(Command3)
		Me.Controls.Add(Combo2)
		Me.Controls.Add(Combo1)
		Me.Controls.Add(Command5)
		Me.Controls.Add(comm)
		Me.Controls.Add(Command4)
		Me.Controls.Add(Command1)
		Me.Controls.Add(Text1)
		Me.Controls.Add(Frame1)
		Me.Controls.Add(Label2)
		Me.Controls.Add(Label1)
		CType(Me.comm, System.ComponentModel.ISupportInitialize).EndInit()
		Me.ResumeLayout(False)
		Me.PerformLayout()
	End Sub
#End Region 
End Class

And here is the changes that i made in the main project file (that you told me to do):

Option Strict Off
Option Explicit On
Imports VB = Microsoft.VisualBasic
Friend Class text_to_RS232
	Inherits System.Windows.Forms.Form
	Dim flag As Boolean 'flag = false : send ID, flag = true : send data
	Dim ID As String 'will contain ID address
	Dim messagestring As String 'will contain all messages to transmit
	Dim charcounter As Short 'will keep track of the position in messagestring
	
	Dim inputtrigger(10) As String 'will keep track of trigger status (1 or 0)
	Dim message(10) As String 'will keep track of message content
	Dim inputnumber(10) As String 'will keep track of input #
	Dim port As String 'keeps serial port #
	Dim trigger(10) As Boolean
	
	
	
	
	
	
	

    Private Sub Combo1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Combo1.SelectedIndexChanged

        If comm.PortOpen = True Then comm.PortOpen = False
        port = Combo1.Text
        comm.CommPort = Val(Combo1.Text)
        comm.Handshake = IO.Ports.Handshake.None
        comm.Settings = "2400,N,8,1"
        comm.OutBufferSize = 4096
        comm.InputLen = 0
        comm.RThreshold = 1
        comm.SThreshold = 1
        comm.PortOpen = True
    End Sub

    'UPGRADE_WARNING: Event Combo1.SelectedIndexChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
    Private Sub Combo1_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Combo1.SelectedIndexChanged
        Dim None As Object
        If comm.PortOpen = True Then comm.PortOpen = False
        port = Combo1.Text
        comm.CommPort = Val(Combo1.Text)
        'UPGRADE_WARNING: Couldn't resolve default property of object None. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
        comm.Handshaking = None
        comm.Settings = "2400,N,8,1"
        comm.OutBufferSize = 4096
        comm.InputLen = 0
        comm.RThreshold = 1
        comm.SThreshold = 1
        comm.PortOpen = True
    End Sub





    'UPGRADE_WARNING: Event Combo2.SelectedIndexChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
    Private Sub Combo2_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Combo2.SelectedIndexChanged
        ID = Combo2.Text

    End Sub

    Private Sub Command1_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command1.Click 'cursor home
        flag = False
        Me.Cursor = System.Windows.Forms.Cursors.WaitCursor
        messagestring = Chr(8)
        charcounter = 1
        Timer1.Enabled = True
    End Sub

    Private Sub Command2_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command2.Click 'send to LCD
        flag = False
        Me.Cursor = System.Windows.Forms.Cursors.WaitCursor

        messagestring = Text1.Text
        charcounter = 1
        Timer1.Enabled = True
    End Sub

    Private Sub Command3_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command3.Click 'clear LCD
        flag = False
        Me.Cursor = System.Windows.Forms.Cursors.WaitCursor
        messagestring = Chr(13)
        charcounter = 1
        Timer1.Enabled = True


    End Sub

    Private Sub Command4_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command4.Click 'date and time
        flag = False
        Me.Cursor = System.Windows.Forms.Cursors.WaitCursor
        messagestring = Chr(13) & "   " & DateString
        charcounter = 1
        Timer1.Enabled = True

    End Sub

    Private Sub Command5_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command5.Click 'time
        flag = False
        Me.Cursor = System.Windows.Forms.Cursors.WaitCursor
        messagestring = Chr(13) & "     " & VB.Left(TimeString, 5)

        charcounter = 1
        Timer1.Enabled = True

    End Sub

    Private Sub Command6_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command6.Click 'clear textbox
        Text1.Text = ""

    End Sub

    Private Sub Command7_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command7.Click
        MsgBox("Make sure K8045 is in 'program mode' (press SW2)")
        flag = False
        Me.Cursor = System.Windows.Forms.Cursors.WaitCursor
        messagestring = "S" & ID & "QQQQQQ" & Chr(13)


        charcounter = 1
        Timer1.Enabled = True
    End Sub

    Private Sub text_to_RS232_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
        Dim t As Integer
        flag = False

        For t = 0 To 9
            'UPGRADE_WARNING: Couldn't resolve default property of object t. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            Combo2.Items.Add((Str(t)))
        Next t
        Combo2.Text = VB6.GetItemString(Combo2, 0)
        ID = "0"


        Timer1.Enabled = False

        On Error GoTo no_port


        comm.CommPort = CShort("1")
        comm.PortOpen = True
        Combo1.Items.Add("1")
        comm.PortOpen = False

        comm.CommPort = CShort("2")
        comm.PortOpen = True
        Combo1.Items.Add("2")
        comm.PortOpen = False

        comm.CommPort = CShort("3")
        comm.PortOpen = True
        Combo1.Items.Add("3")
        comm.PortOpen = False

        comm.CommPort = CShort("4")
        comm.PortOpen = True
        Combo1.Items.Add("4")
        comm.PortOpen = False
        Exit Sub

no_port:
        Combo1.Text = VB6.GetItemString(Combo1, 0)


        Exit Sub
    End Sub

    Private Sub Form_Terminate_Renamed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
        If comm.PortOpen = True Then comm.PortOpen = False
    End Sub









    'UPGRADE_WARNING: Event Text1.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
    Private Sub Text1_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Text1.TextChanged 'tekstbox
        'aaa
    End Sub

    Private Sub Timer1_Tick(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Timer1.Tick

        If flag = False Then GoTo sendID

        comm.Output = Mid(messagestring, charcounter, 1)
        charcounter = charcounter + 1
        If charcounter = Len(messagestring) + 1 Then Timer1.Enabled = False
        flag = False
        If Timer1.Enabled = False Then Me.Cursor = System.Windows.Forms.Cursors.Default

        Exit Sub
sendID:
        comm.Output = ID
        flag = True

    End Sub
End Class

Thanks, Man1919.

I'm not sure, but i think i fix the problem.
i delete this line in the designer file:
(line: 13 Column: 5)

Form_Terminate_renamed()

from this section:

<System.Diagnostics.DebuggerNonUserCode()> Protected Overloads Overrides Sub Dispose(ByVal Disposing As Boolean)
		If Disposing Then
			Static fTerminateCalled As Boolean
			If Not fTerminateCalled Then
                                Form_Terminate_renamed()
				fTerminateCalled = True
			End If
			If Not components Is Nothing Then
				components.Dispose()
			End If
		End If
		MyBase.Dispose(Disposing)
	End Sub

And i think its repair this 2 errors:

Argument not specified for parameter 'e' of 'Private Sub Form_Terminate_Renamed(sender As Object, e As System.Windows.Forms.FormClosedEventArgs)'.

Argument not specified for parameter 'sender' of 'Private Sub Form_Terminate_Renamed(sender As Object, e As System.Windows.Forms.FormClosedEventArgs)'.

And i discover (in the main code) that this code:

Private Sub Combo1_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Combo1.TextChanged
		Dim None As Object
		If comm.PortOpen = True Then comm.PortOpen = False
		port = Combo1.Text
		comm.CommPort = Val(Combo1.Text)
		'UPGRADE_WARNING: Couldn't resolve default property of object None. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
		comm.Handshaking = None
		comm.Settings = "2400,N,8,1"
		comm.OutBufferSize = 4096
		comm.InputLen = 0
		comm.RThreshold = 1
		comm.SThreshold = 1
		comm.PortOpen = True
	End Sub

is showing twice, in line 25 and in line 41
its the same code, so i delete one of them and its work too! :)
and this error, that i got before i delete it:
(line: 24 Column: 17) 'Private Sub Combo1_SelectedIndexChanged(eventSender As Object, eventArgs As System.EventArgs)' has multiple definitions with identical signatures. are gone!

So, you think that what i made its fine?
its will not case any error or carsh?

PS: here is the full code (main pogram code) after what i did:

Option Strict Off
Option Explicit On
Imports VB = Microsoft.VisualBasic
Friend Class text_to_RS232
	Inherits System.Windows.Forms.Form
	Dim flag As Boolean 'flag = false : send ID, flag = true : send data
	Dim ID As String 'will contain ID address
	Dim messagestring As String 'will contain all messages to transmit
	Dim charcounter As Short 'will keep track of the position in messagestring
	
	Dim inputtrigger(10) As String 'will keep track of trigger status (1 or 0)
	Dim message(10) As String 'will keep track of message content
	Dim inputnumber(10) As String 'will keep track of input #
	Dim port As String 'keeps serial port #
	Dim trigger(10) As Boolean
	
    Private Sub Combo1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Combo1.SelectedIndexChanged
        If comm.PortOpen = True Then comm.PortOpen = False
        port = Combo1.Text
        comm.CommPort = Val(Combo1.Text)
        comm.Handshaking = IO.Ports.Handshake.None
        comm.Settings = "2400,N,8,1"
        comm.OutBufferSize = 4096
        comm.InputLen = 0
        comm.RThreshold = 1
        comm.SThreshold = 1
        comm.PortOpen = True

    End Sub

    'UPGRADE_WARNING: Event Combo2.SelectedIndexChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
    Private Sub Combo2_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Combo2.SelectedIndexChanged
        ID = Combo2.Text
    End Sub

    Private Sub Command1_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command1.Click 'cursor home
        flag = False
        Me.Cursor = System.Windows.Forms.Cursors.WaitCursor
        messagestring = Chr(8)
        charcounter = 1
        Timer1.Enabled = True
    End Sub

    Private Sub Command2_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command2.Click 'send to LCD
        flag = False
        Me.Cursor = System.Windows.Forms.Cursors.WaitCursor

        messagestring = Text1.Text
        charcounter = 1
        Timer1.Enabled = True
    End Sub

    Private Sub Command3_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command3.Click 'clear LCD
        flag = False
        Me.Cursor = System.Windows.Forms.Cursors.WaitCursor
        messagestring = Chr(13)
        charcounter = 1
        Timer1.Enabled = True


    End Sub

    Private Sub Command4_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command4.Click 'date and time
        flag = False
        Me.Cursor = System.Windows.Forms.Cursors.WaitCursor
        messagestring = Chr(13) & "   " & DateString
        charcounter = 1
        Timer1.Enabled = True

    End Sub

    Private Sub Command5_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command5.Click 'time
        flag = False
        Me.Cursor = System.Windows.Forms.Cursors.WaitCursor
        messagestring = Chr(13) & "     " & VB.Left(TimeString, 5)

        charcounter = 1
        Timer1.Enabled = True

    End Sub

    Private Sub Command6_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command6.Click 'clear textbox
        Text1.Text = ""

    End Sub

    Private Sub Command7_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command7.Click
        MsgBox("Make sure K8045 is in 'program mode' (press SW2)")
        flag = False
        Me.Cursor = System.Windows.Forms.Cursors.WaitCursor
        messagestring = "S" & ID & "QQQQQQ" & Chr(13)


        charcounter = 1
        Timer1.Enabled = True
    End Sub

    Private Sub text_to_RS232_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
        Dim t As Integer
        flag = False

        For t = 0 To 9
            'UPGRADE_WARNING: Couldn't resolve default property of object t. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            Combo2.Items.Add((Str(t)))
        Next t
        Combo2.Text = VB6.GetItemString(Combo2, 0)
        ID = "0"


        Timer1.Enabled = False

        On Error GoTo no_port


        comm.CommPort = CShort("1")
        comm.PortOpen = True
        Combo1.Items.Add("1")
        comm.PortOpen = False

        comm.CommPort = CShort("2")
        comm.PortOpen = True
        Combo1.Items.Add("2")
        comm.PortOpen = False

        comm.CommPort = CShort("3")
        comm.PortOpen = True
        Combo1.Items.Add("3")
        comm.PortOpen = False

        comm.CommPort = CShort("4")
        comm.PortOpen = True
        Combo1.Items.Add("4")
        comm.PortOpen = False
        Exit Sub

no_port:
        Combo1.Text = VB6.GetItemString(Combo1, 0)


        Exit Sub
    End Sub

    Private Sub Form_Terminate_Renamed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
        If comm.PortOpen = True Then comm.PortOpen = False
    End Sub

    'UPGRADE_WARNING: Event Text1.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
    Private Sub Text1_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Text1.TextChanged 'tekstbox
        'aaa
    End Sub


    Private Sub Timer1_Tick(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Timer1.Tick

        If flag = False Then GoTo sendID

        comm.Output = Mid(messagestring, charcounter, 1)
        charcounter = charcounter + 1
        If charcounter = Len(messagestring) + 1 Then Timer1.Enabled = False
        flag = False
        If Timer1.Enabled = False Then Me.Cursor = System.Windows.Forms.Cursors.Default

        Exit Sub
sendID:
        comm.Output = ID
        flag = True

    End Sub
End Class

thanks, man1919

I'm not sure, but i think i fix the problem.
i delete this line in the designer file:
(line: 13 Column: 5)

Form_Terminate_renamed()

from this section:

<System.Diagnostics.DebuggerNonUserCode()> Protected Overloads Overrides Sub Dispose(ByVal Disposing As Boolean)
		If Disposing Then
			Static fTerminateCalled As Boolean
			If Not fTerminateCalled Then
                                Form_Terminate_renamed()
				fTerminateCalled = True
			End If
			If Not components Is Nothing Then
				components.Dispose()
			End If
		End If
		MyBase.Dispose(Disposing)
	End Sub

And i think its repair this 2 errors:

Argument not specified for parameter 'e' of 'Private Sub Form_Terminate_Renamed(sender As Object, e As System.Windows.Forms.FormClosedEventArgs)'.

Argument not specified for parameter 'sender' of 'Private Sub Form_Terminate_Renamed(sender As Object, e As System.Windows.Forms.FormClosedEventArgs)'.

And i discover (in the main code) that this code:

Private Sub Combo1_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Combo1.TextChanged
		Dim None As Object
		If comm.PortOpen = True Then comm.PortOpen = False
		port = Combo1.Text
		comm.CommPort = Val(Combo1.Text)
		'UPGRADE_WARNING: Couldn't resolve default property of object None. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
		comm.Handshaking = None
		comm.Settings = "2400,N,8,1"
		comm.OutBufferSize = 4096
		comm.InputLen = 0
		comm.RThreshold = 1
		comm.SThreshold = 1
		comm.PortOpen = True
	End Sub

is showing twice, in line 25 and in line 41
its the same code, so i delete one of them and its work too! :)
and this error, that i got before i delete it:
(line: 24 Column: 17) 'Private Sub Combo1_SelectedIndexChanged(eventSender As Object, eventArgs As System.EventArgs)' has multiple definitions with identical signatures. are gone!

So, you think that what i made its fine?
its will not case any error or carsh?

PS: here is the full code (main pogram code) after what i did:

Option Strict Off
Option Explicit On
Imports VB = Microsoft.VisualBasic
Friend Class text_to_RS232
	Inherits System.Windows.Forms.Form
	Dim flag As Boolean 'flag = false : send ID, flag = true : send data
	Dim ID As String 'will contain ID address
	Dim messagestring As String 'will contain all messages to transmit
	Dim charcounter As Short 'will keep track of the position in messagestring
	
	Dim inputtrigger(10) As String 'will keep track of trigger status (1 or 0)
	Dim message(10) As String 'will keep track of message content
	Dim inputnumber(10) As String 'will keep track of input #
	Dim port As String 'keeps serial port #
	Dim trigger(10) As Boolean
	
    Private Sub Combo1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Combo1.SelectedIndexChanged
        If comm.PortOpen = True Then comm.PortOpen = False
        port = Combo1.Text
        comm.CommPort = Val(Combo1.Text)
        comm.Handshaking = IO.Ports.Handshake.None
        comm.Settings = "2400,N,8,1"
        comm.OutBufferSize = 4096
        comm.InputLen = 0
        comm.RThreshold = 1
        comm.SThreshold = 1
        comm.PortOpen = True

    End Sub

    'UPGRADE_WARNING: Event Combo2.SelectedIndexChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
    Private Sub Combo2_SelectedIndexChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Combo2.SelectedIndexChanged
        ID = Combo2.Text
    End Sub

    Private Sub Command1_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command1.Click 'cursor home
        flag = False
        Me.Cursor = System.Windows.Forms.Cursors.WaitCursor
        messagestring = Chr(8)
        charcounter = 1
        Timer1.Enabled = True
    End Sub

    Private Sub Command2_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command2.Click 'send to LCD
        flag = False
        Me.Cursor = System.Windows.Forms.Cursors.WaitCursor

        messagestring = Text1.Text
        charcounter = 1
        Timer1.Enabled = True
    End Sub

    Private Sub Command3_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command3.Click 'clear LCD
        flag = False
        Me.Cursor = System.Windows.Forms.Cursors.WaitCursor
        messagestring = Chr(13)
        charcounter = 1
        Timer1.Enabled = True


    End Sub

    Private Sub Command4_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command4.Click 'date and time
        flag = False
        Me.Cursor = System.Windows.Forms.Cursors.WaitCursor
        messagestring = Chr(13) & "   " & DateString
        charcounter = 1
        Timer1.Enabled = True

    End Sub

    Private Sub Command5_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command5.Click 'time
        flag = False
        Me.Cursor = System.Windows.Forms.Cursors.WaitCursor
        messagestring = Chr(13) & "     " & VB.Left(TimeString, 5)

        charcounter = 1
        Timer1.Enabled = True

    End Sub

    Private Sub Command6_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command6.Click 'clear textbox
        Text1.Text = ""

    End Sub

    Private Sub Command7_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command7.Click
        MsgBox("Make sure K8045 is in 'program mode' (press SW2)")
        flag = False
        Me.Cursor = System.Windows.Forms.Cursors.WaitCursor
        messagestring = "S" & ID & "QQQQQQ" & Chr(13)


        charcounter = 1
        Timer1.Enabled = True
    End Sub

    Private Sub text_to_RS232_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
        Dim t As Integer
        flag = False

        For t = 0 To 9
            'UPGRADE_WARNING: Couldn't resolve default property of object t. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
            Combo2.Items.Add((Str(t)))
        Next t
        Combo2.Text = VB6.GetItemString(Combo2, 0)
        ID = "0"


        Timer1.Enabled = False

        On Error GoTo no_port


        comm.CommPort = CShort("1")
        comm.PortOpen = True
        Combo1.Items.Add("1")
        comm.PortOpen = False

        comm.CommPort = CShort("2")
        comm.PortOpen = True
        Combo1.Items.Add("2")
        comm.PortOpen = False

        comm.CommPort = CShort("3")
        comm.PortOpen = True
        Combo1.Items.Add("3")
        comm.PortOpen = False

        comm.CommPort = CShort("4")
        comm.PortOpen = True
        Combo1.Items.Add("4")
        comm.PortOpen = False
        Exit Sub

no_port:
        Combo1.Text = VB6.GetItemString(Combo1, 0)


        Exit Sub
    End Sub

    Private Sub Form_Terminate_Renamed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
        If comm.PortOpen = True Then comm.PortOpen = False
    End Sub

    'UPGRADE_WARNING: Event Text1.TextChanged may fire when form is initialized. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="88B12AE1-6DE0-48A0-86F1-60C0686C026A"'
    Private Sub Text1_TextChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Text1.TextChanged 'tekstbox
        'aaa
    End Sub


    Private Sub Timer1_Tick(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Timer1.Tick

        If flag = False Then GoTo sendID

        comm.Output = Mid(messagestring, charcounter, 1)
        charcounter = charcounter + 1
        If charcounter = Len(messagestring) + 1 Then Timer1.Enabled = False
        flag = False
        If Timer1.Enabled = False Then Me.Cursor = System.Windows.Forms.Cursors.Default

        Exit Sub
sendID:
        comm.Output = ID
        flag = True

    End Sub
End Class

and also i got this error: 'Handshake' is not a member of 'AxMSCommLib.AxMSComm'. so i change this line:

comm.Handshake = IO.Ports.Handshake.None

with this line:

comm.Handshaking = IO.Ports.Handshake.None

and its work. :)

thanks, man1919

never mind...
its working without problems.
so i dont need help, thx you GeekByChoiCe anyway.
i close the thread.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.