Communication VBQB

I making a program in QBasic but there are some things that
I can't do in QB, so I want to do some parts of the program
in VB. Do you know how can I send commands to the VB and then recive the result in QB.

I know this is possible with DMA, if you know how can I access the DMA in VB and QB please help me

Thanks

Comments

  • : I making a program in QBasic but there are some things that
    : I can't do in QB, so I want to do some parts of the program
    : in VB. Do you know how can I send commands to the VB and then recive the result in QB.
    :
    : I know this is possible with DMA, if you know how can I access the DMA in VB and QB please help me
    :
    : Thanks
    :

    If you're referin to VBDOS, I can tell you that it supports the CHAIN commands that QB does. If that's not good enough, you can always go with DMA...

    Dim X As Long
    SHELL "VBAPP.EXE " + VARSEG(X) + " " + VARPTR(X)

    And in the VB app:

    DIM C1 AS LONG
    DIM C2 AS LONG
    C1 = VAL(LEFT$(COMMAND$, INSTR(1, COMMAND$, " ") - 1))
    C2 = VAL(RIGHT$(COMMAND$, LEN(COMMAND$) - LEN(C1) - 1))
    DEFSEG C1

    Use Peek and Poke at C2 to access the value of X from the QB app.

    What is it that you can't do in QB that you wish to do in VB?
  • I have VBDOS, VB3, VB4, VB5, VB6, QB1.1, QB3, QB3.5, QB4.0, QB4.5 and QB7.1, the problem is that the task of VB program must go with Windows (it use internet), and has to go in background.
  • The VB app could take whatever it is from the internet you need and write it to file for the QB app to read.

    : I making a program in QBasic but there are some things that
    : I can't do in QB, so I want to do some parts of the program
    : in VB. Do you know how can I send commands to the VB and then recive the result in QB.
    :
    : I know this is possible with DMA, if you know how can I access the DMA in VB and QB please help me
    :
    : Thanks
    :

  • : The VB app could take whatever it is from the internet you
    : need and write it to file for the QB app to read.

    I know but I don't know how the VB program can tell the QB program "The work is done, you can read the result", I can't do it by file becose when the VB will be writing to file, in QB I won't be able to open it becose there will be an error

  • : : The VB app could take whatever it is from the internet you
    : : need and write it to file for the QB app to read.
    :
    : I know but I don't know how the VB program can tell the QB program "The work is done, you can read the result", I can't do it by file becose when the VB will be writing to file, in QB I won't be able to open it becose there will be an error
    :
    :

    Let the VB app create a "trigger" file when it's done writing to the other file. When the QB file notices that this "trigger" file exists, then the VB app is done with the other file.

    Optionally, trap the error and retry until it works.
  • : : The VB app could take whatever it is from the internet you
    : : need and write it to file for the QB app to read.
    :
    : I know but I don't know how the VB program can tell the QB program "The work is done, you can read the result", I can't do it by file becose when the VB will be writing to file, in QB I won't be able to open it becose there will be an error
    :
    :

    use SHARED in your open statement to allow other things access to it while it's open (i think that's what it does, anyway).
    This is not the same SHARED as DIM SHARED...

    As for knowing when the work is done - you could have a specific string in the file signify that it's complete.
  • Thanks every one for help

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories