Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Interfacing LPT1 with VB6

Status
Not open for further replies.
pablome said:

hi,
The errorfq5.jpg is saying you have not placed inpout32.dll in the Windows/System directory!.

I have downloaded your 'filefactory' Test1.zip, it runs OK, ref the gif.
The problem is with the setup in your PC.

Do a windows search of your 'C' drive, for inpout32.dll

Eric
 
Last edited:
pablome said:
maybe I dont have administrative rights to install it.
hi,
Have you found the dll on your hard drive??

If not, Google for inpout32.dll, its available from a number of sites, its free.

Download it, then using Windows Explorer, move it into the Windows/System32 directory.

Let me know how it goes

Why do you think you dont have 'administrative rights ' is it your PC??

Eric
 
I know sometimes that when I do change the bit status, to like 4 instead of previous after toggleing the switch, sometimes it doesnt refersh or see it to when the switch is back to normal possible. Wondwer if there is something wrong with dll or linking or xp or LPT1 settings.
 
=/ it is there.
 

Attachments

  • inpout32dllsearchfound.JPG
    inpout32dllsearchfound.JPG
    85.6 KB · Views: 169
pablome said:
at run time for .EXE I get this.
hi,
Google for dllport.dll, download it and place it in your Windows/System directory.

EDIT:
Dll's in zip file.
 
Last edited:
The zip file you provide has the files to put into directory?
Did google and it says dlportio.dll to search instead?
 
I FINALY GOT IT TO WORK FINE! :) Those 2 DLL files were surely needed.
Thanks so much...I'll continue on this and see what else is needed.
Im not done yet cuz I'll have to tell another VB program that the status of the pin10 has changed somehow during its run, so 2 programs will run simultaneously.
 
pablome said:
I FINALY GOT IT TO WORK FINE! :) Those 2 DLL files were surely needed.
Thanks so much...I'll continue on this and see what else is needed.
Im not done yet cuz I'll have to tell another VB program that the status of the pin10 has changed somehow during its run, so 2 programs will run simultaneously.

Do you have the source code for the 'other' program, if yes, its fairly easy to combine the two programs.
 
How do I make it so that at Form Load it will detect the changes, not only during click button but continuously during form load. Not just once? a While loop?
 
pablome said:
How do I make it so that at Form Load it will detect the changes, not only during click button but continuously during form load. Not just once? a While loop?

hi,
You could use a Timer, or a Do........Loop, with a DoEvents within the Loop.
 
How or why use a timer when that may be tricky/weird when there are functions that can be made already from Do While or For Next. Although Im not sure how to put it. Cuz Do while Pin10 = 64 ..Print High..
what if its not 64? an else?
 
pablome said:
How or why use a timer when that may be tricky/weird when there are functions that can be made already from Do While or For Next. Although Im not sure how to put it. Cuz Do while Pin10 = 64 ..Print High..
what if its not 64? an else?
hi,
If you just want to test the state of pin #10 at a regular rate you should use a Timer subr.

If you want to constantly test the state of pin #10, then use a Do...Loop with an internal conditional test of pin #10

I did ask you if you have the source code for the other VB program you are trying to interact with, have you???

Dont forget to place a DoEvents inside the Loop.
 
Actually Also I now need a timer(from VB I guess) that every second it will than check for the status. Hope thats easy to implement.

The source code for the main code I don thave yet, cuz my task is still to get the lil program ready and going before I interact it with the main one.
I think it will be 2 forms, one main large one and other small one, the one Im working on now- that check the stauts and it will tell it that it did to the main form or program. In .exe itl be two windows I think when running.

I wonder how I can alternate the colour in the lbl text every time a status is shown or better yet make it blink.
 
Last edited:
pablome said:
Actually Also I now need a timer(from VB I guess) that every second it will than check for the status. Hope thats easy to implement.

The source code for the main code I don thave yet, cuz my task is still to get the lil program ready and going before I interact it with the main one.
I think it will be 2 forms, one main large one and other small one, the one Im working on now- that check the stauts and it will tell it that it did to the main form or program. In .exe itl be two windows I think when running.

I wonder how I can alternate the colour in the lbl text every time a status is shown or better yet make it blink.

hi,
In VB, from the components images, select a Timer, place it on the Form and fill out the properties. The interval in mSecs, enabled etc.....

Then call the Read subr from within the Timer1 subr.
You can use a 'Shape' component to change colour depending upon the state of pin #10, by changing the 'fill' colour.

Do you follow this OK?

EDIT: Look at the VB5...zip
 
Last edited:
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top