PDA

View Full Version : Ace VB6?



Father-Time.
September 26th, 2003, 18:43
Ace i did this code in VB6 using a reference manual.
I have a4*20 character lcd display, i wanted this code to be an input box so i could send a message through the serial port onto the display.

Heres the prob, box comes up in windows accepts message i type but dont send. I cannot for the life of me see anything wrong, can you


Private Declare Function SER_OPEN& Lib "SERSEN04.DLL" (ByVal commPort&, ByVal baudRate&)
Private Declare Function SER_CLOSE& Lib "SERSEN04.DLL" ()
Private Declare Sub SER_SEND Lib "SERSEN04.DLL" (theString$)
Private Declare Sub SER_RAWSEND Lib "SERSEN04.DLL" (theString$)
Private Declare Function SER_VERSINFO$ Lib "SERSEN04.DLL" ()


Private Sub Command1_Click()
' Code for the "Send" button.
Call SER_OPEN(2, 9600)
SER_SEND (Text1.Text)
Call SER_CLOSE
End Sub

Private Sub Command2_Click()
' Code for the "Version" button.
Text1.Text = SER_VERSINFO$()
End Sub


Father

Father-Time.
September 27th, 2003, 04:28
Just figured out is you send a set of instructions through serial port 2, then you should reallly plug your serial cable into port 2 and not port 1!!! :stick: :oops: :stick: :oops: :stick: :oops: :stick: :oops: :stick: :oops: :stick:

Stupid i am sometimes and now very embarassed!!! :lol:

-=DoW=- Acedeal
September 27th, 2003, 04:28
: :oops: :oops:

Gandiman
September 29th, 2003, 10:15
Does port 1 fit into Port 2 :)

Father-Time.
September 29th, 2003, 10:20
YUP!! It does with a little persuasion!!! :stick: :stick: