Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

vb6 and parallel port

Status
Not open for further replies.

leilarazavi2000

Member level 2
Joined
Dec 1, 2002
Messages
50
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
463
vb6 to parallel port

Any body knows how to access parallel port in vb6 (for win98 and xp)

tnx
 

mmfuria

Junior Member level 3
Joined
Jul 14, 2002
Messages
27
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
140
port32.ocx xp

In the 32 bits operating system (like NT, 2000 & XP) you cannot access directly. You need a driver. There is a generic driver called "userport" (google it). You may need also to code assembly routines for input and output ports. The userport package come with examples.

M&Mfuria
 

G

Guest

Guest
write code in vb6 for parallel ports

look for jan axelson's parallel port complete book. or go to his site at www.lvr.com 8)
 

E-goe

Member level 5
Joined
Jan 10, 2003
Messages
84
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
715
parallel port xp vb6

Another way to acces the parallel port in VB6:

Create a DLL in Visual C++ and import this DLL in your VB program

More information about DLL's: www.boondog.com
Look for "Visual Basic (DLL's) and PC Interfacing" under the Tutorial link.

I know it will work under Win98 but I'm not sure if it will work under WinXP.

Greetz Joris
 

mmfuria

Junior Member level 3
Joined
Jul 14, 2002
Messages
27
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
140
vb6 print to parallel port

Userport is a generic driver (.sys) that use some special undocumented function calls in windows to grant access to any port to any user. All you need is run the executable once. You need administrator rights to install.

No especial DLL is needed. You CAN use normal assembly instructions (like in the examples), that can be inside your code in VB or in an external DLL.

I have used it many times in NT, 2000 and XP with no problems.

The main drawback is that you have too much power :) so you can, for example, change bits in parallel port during a print session!
 

SphinX

Advanced Member level 3
Joined
Jan 25, 2002
Messages
822
Helped
58
Reputation
116
Reaction score
29
Trophy points
1,308
Location
EGYPT
Activity points
7,045
port95nt.exe conflicts

Hi,

Read EPE Mag. AUGUST 2001.
There is a simple project for parallel interface using VB .

PM if you don't have it.

Bye
 

inam

Newbie level 2
Joined
May 7, 2003
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
16
visual basic 6 ecp ocx

HI,
I want to develope a home automation project using serial port, if any one have material relating this, send me at
inam_125@hotmail.com
with thanks
 

dsoares

Newbie level 4
Joined
Dec 24, 2003
Messages
6
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,283
Activity points
50
parallel port+xp+visual basic+userport+port32

You can use the "port95nt.exe". Google it.

It is a driver that can be user under Win 95, 98, NT, 2000 and XP.

There are examples programs in C++ and VB.
 

Bukitoo

Full Member level 2
Joined
Oct 12, 2003
Messages
122
Helped
3
Reputation
6
Reaction score
1
Trophy points
1,298
Location
Argentina
Activity points
1,061
open lpt port vb6

I use a driver called WINIO. It works under windows 98 and XP

Now I need something from you guys.
first, I need to know at which speed the parallel port works.
I wanted to measure that speed with visual basic (because i need to use that language and I need to use the port.) but I dont have a wait routine with resolution in time (for ex: i need to wait 50 us os .1ms)

Do you have an open source code to do that?
 

sadat007

Full Member level 4
Joined
Dec 31, 1999
Messages
235
Helped
13
Reputation
26
Reaction score
7
Trophy points
1,298
Location
Pakistan
Activity points
1,773
send bits to parallel port

hi,
I think such speed with normal LPT not possible. With EPP/ECP and DMA function it may be...
 

Bukitoo

Full Member level 2
Joined
Oct 12, 2003
Messages
122
Helped
3
Reputation
6
Reaction score
1
Trophy points
1,298
Location
Argentina
Activity points
1,061
access parallel port vb under windowsxp

Thanks sadat007 !

Ok. O would like to know how to use those modes of operation with visual basic.

However, I would like an accurate delay routine in VB.

Thanks !
 

sadat007

Full Member level 4
Joined
Dec 31, 1999
Messages
235
Helped
13
Reputation
26
Reaction score
7
Trophy points
1,298
Location
Pakistan
Activity points
1,773
visual basic 6.0 parallel port ex 02

As much I know not possible in VB... May be in VC but no experience of VC I have.
Sorry :?
 

sherif12

Junior Member level 3
Joined
Nov 24, 2003
Messages
30
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
253
how to access lpt port in vb codings]

Bukitoo said:
However, I would like an accurate delay routine in VB.

Thanks !

in a module write,
Code:
Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

in your form within your code

Code:
' Suspend  program execution for 1 second (1000 milliseconds)
 Sleep 1000

this is the procedure in Vb to delay your program by Milliseconds,

it is just accurate and it won't hang up machine like for loops and stuff.

regards,

Sherif.
 

Bukitoo

Full Member level 2
Joined
Oct 12, 2003
Messages
122
Helped
3
Reputation
6
Reaction score
1
Trophy points
1,298
Location
Argentina
Activity points
1,061
vb6 + read parallel port

Thanks sherif12 !

I red in a book that Sleep causes all the programs hang up, not oly the one who cares for me.

Is that true ?
 

sherif12

Junior Member level 3
Joined
Nov 24, 2003
Messages
30
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
253
lpt3 vb win95io.dll

nope @ all,

i tried it in many program, all what it do is hanging the procedure or function or sub it is in, differing from for loops which hang the whole machine..

anyway, don't beleive me and try it yourself :roll:

thanks,

Sherif.
 

cristiaw

Newbie level 3
Joined
Dec 23, 2003
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
42
vb6 parallel port interfacing samples

leilarazavi2000 said:
Any body knows how to access parallel port in vb6 (for win98 and xp)

tnx
:D
I did a program for to send bits to a paralell port .. I you want I ll send source code... in this moment i cant because im in the work.

Bye
Christian
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top