please help!!!

please help!!!

Post by Carlos Varga » Thu, 27 Feb 2003 02:58:26



Sorry for my bad english
my name is carlos vargas from nicaragua.

this is my hardware
    pc pocket iPaq
    iSwip Magnetic card readers
============================================================================
===
boys, i have 3 problems, programing a pc pocket with iSwip.

1.- I use the comm control in a form for read the info.
the info is for example:

4260-4477-0007-001 (number card)
and 2 char control (at begin "%" and "?'"  at end of string)

the first time, the input method return the char "", the second time return
"%4260-4477-0007-001?" (this is the correct)

the method what i use is

Private Sub Comm1_OnComm()
    Dim nEvent As Integer

    nEvent = Comm1.CommEvent

    If nEvent = comEvReceive Then

        'trasfiere el buffer de entrada a variable
        InputData = Comm1.Input
        txtNumCard.Text = InputDat

        InputData = ""

    End If

End Sub

the setting of comm control is:
      CommPort        =   1
      Settings        =   "9600,N,8,1"
      InputLen        =   0
      InputMode       =   0
      NullDiscard     =   0   'False
      ParityReplace   =   "?"
      RThreshold      =   24
      SThreshold      =   0
      Handshaking     =   2
      DTREnable       =   -1  'True
      RTSEnable       =   -1  'True

What is the correct config.

2).- i have 2 controls textbox ( txtCuotasPagadas and txtValorCuota) the
mult between two value is the value of other
textbox control txtTotalPagado.

in the LostFocus of event i put the code:

rivate Sub txtCuotasPagadas_LostFocus()
    CalcTotalPago
End Sub

Private Sub txtValorCuota_LostFocus()
    CalcTotalPago
End Sub

Private Sub CalcTotalPago()
    Dim nTotal As Double
    nTotal = CInt(txtCuotasPagadas.Text) * CDbl(txtValorCuota.Text)

    txtTotalPagado.Text = CStr(nTotal)

End Sub

and the error is type mismatch cdbl

what is the wrong

3. i open the comm in the load event.
   i close the comm in the click event of a button

  the load event execute only one time, the second time what i open the form
the load event no execute.
in what place put the open and close of comm controls.

sorry for the long post.
thanks any help :-)

carlos vargas

 
 
 

please help!!!

Post by Keld Laurse » Thu, 27 Feb 2003 16:30:28


Aargh. For some reason my OE have started dying on me.
I tried to answer this one a couple of times last night, but each time the
editor window hung itself irretrievably.
(Any idea where to ask intimate questions about OE6 and the various
updates?) :-)


Quote:> 1.- I use the comm control in a form for read the info.
> the info is for example:

> 4260-4477-0007-001 (number card)
> and 2 char control (at begin "%" and "?'"  at end of string)

> the first time, the input method return the char "", the second time
return
> "%4260-4477-0007-001?" (this is the correct)

You will often have this behaviour (stray characters) from opening the
serial port on battery operated devices.

What you do is that you start receiving data. As soon as you receive a %,
you start storing data in a buffer.
When a ? cones by, you send the buffer contents to whatever routine is
supposed to handle it.

Quote:> 2).- i have 2 controls textbox ( txtCuotasPagadas and txtValorCuota) the
> mult between two value is the value of other
> textbox control txtTotalPagado.
> Private Sub CalcTotalPago()
>     Dim nTotal As Double
>     nTotal = CInt(txtCuotasPagadas.Text) * CDbl(txtValorCuota.Text)

>     txtTotalPagado.Text = CStr(nTotal)

> End Sub

> and the error is type mismatch cdbl

You shouldn't have to use explicit casts here. All data are variants

Your problem here could be one of two things:
1) You have some spaces in front or in the back of your text field. Try
using Trim(YourTextValue)
2) The number is using the wrong kind of decimal point. The decimal point is
determined by the international settings.
What you should do is make a small test to see if you can use cdbl on one
case and not in another, thus:

dim a as double
    on error resume next
        a=cdbl("1.23")
        if err then
            msgbox "You cant use . as a decimal point"
        else
            msgbox "You use . as a decimal point"
        end if
        err=0
        a=cdbl("1,23")
        if err then
            msgbox "You cant use , as a decimal point"
        else
            msgbox "You use , as a decimal point"
        end if
        err=0
    on error goto 0

Quote:> 3. i open the comm in the load event.
>    i close the comm in the click event of a button

>   the load event execute only one time, the second time what i open the
form
> the load event no execute.
> in what place put the open and close of comm controls.

You can't unload a form in eVB (At least not officially). Form that follows
that you can't re-load it either.
That's why you don't get another form_load event.

Put your code in some public procedure on the form, like MyForm_reload, and
call it from the outside when you what to show the form with initialised
values:

Public Sub MyForm_reload()
    ...Do my initialisation of variables and form layout etc. ...
    MyForm.Show ' Show the form
End Sub

HTH

Keld Laursen

 
 
 

please help!!!

Post by Carlos Varga » Fri, 28 Feb 2003 03:00:24


very thank, i test you 3 idea.

carlos vargas

 
 
 

1. HELP PLEASE HELP PLEASE HELP PLEASE

Hello,

I am having a problem which I don't quite understand.

I recently used my COMPAQ RECOVERY CD and restarted my
computer back to it's original factory settings.

Since then, when I got back on the Internet I can no
longer play on Yahoo games. (www.yahoo.com/games) It
gives me 4 reasons:

1) You are behind a firewall.
2) You are not connected to the internet.
3) The server is down.
4) You have a stale page in your cache.

I was connected to the Internet, the server was not down,
I have erased all of the pages in my cache, so that leads
me to one conclusion, the firewall.

Also, I have been unable to go into chatrooms, I can use
the Yahoo chatrooms, but at the start of a chatroom it
says "You cannot use Voice in this chat because you are
behind a firewall" or something very similar to that.
Some other chatrooms do not work. (www.rimestimes.com,
www.leannfans.com)

I have not done anything to change anything as far as I
know, can someone please help me?

I have tried checking the Firewall box on my connections
in the `Advanced` tab and it still doesn't work either
way.

Can someone tell me what I need to do, in a simple way if
you can.

Thanx.

~Michael~

2. Pause a filter graph

3. printing from the web please help please help me

4. Server TCP/IP one way Ping??

5. PLEASE HELP, PLEASE HELP!

6. Win NT memory limit

7. Please Help 386 sound too FAST why please help!!

8. Conner HD (CFA540A) with Zappa mother board

9. please please please help!!!!!

10. -->PLEASE PLEASE PLEASE help me with Audio Logic 2.6<--

11. PLEASE PLEASE PLEASE HELP

12. Please Please Please Help

13. Please please please help!